My MILs dog was constipated after surgery, vet prescribed Metamucil, sorry can't remember the amount. He wouldn't eat the metamucil, but would eat BeneFiber (flavorless, dissolves better in water).
When I thought my dog was constipated I took her to the vet. It turned out that I was wrong. The exrays showed that she had kidney stones. The surgery went well and she is doing great a year later. I have her on a special diet though.
Just sayin, it may be something more serious.
If it is just constipation, some cooked vegies may do the trick. maybe green beans , carrots, and a little broccolli? Sometimes changing the dog food will do it.
If it is more serious than that i would see the vet.
We have a cat that has megacolon. If your dog has chronic constipation, you can get a product from the vet called Laculose. Pumpkin, metamucil (no flavor kind), prune juice, fish oil pills, and mineral oil help but you have to be 100% positive that there isn't an impaction before you give any kind of oil or you can rupture the intestines.