The green parts of tomatoes, including the stems and vines, as well as unripened tomatoes, contain a toxin called solanine.
Generally, tomatoes have small amounts of this toxin that won't harm dogs, but when eaten in large quantities, they can cause problems.
It is best to avoid giving your dog these products.