Well, Dogs are scavengers just like humans...so they can eat pretty much anything we give them...including cardboard, glue, and dead mice off the ground. I mean, my father had dogs on his farm and they ate ten day old dead chickens and lived to be a healthy 18 years. But, if you want a healthy happy dog, you should treat them as if they were a human. Humans can eat large quantities of peanut butter, but it isn't necessarily good for them. It can cause stomach problems and ultimately lead to a shorter life. So, use common sense and make it a treat once in a while. I, for example, give my dog peanut butter to distract him when I'm trimming his nails or grooming his fur. He loves the taste and keeps smacking his lips long after the peanut butter is gone. It gives me time to get work done.
Everything in moderation is fine. Just avoid chocolate and things with too much sugar...as dogs react to chocolate a lot differently than we do. And, of course, sugar is something dogs and humans can indeed tolerate, but should not have a large abundance of it. Also, I would suggest feeding your dog vegetables as often as possible...they aren't purely carnivores. Some fruits are good as well, but like humans, you must limit the sugar intake.