Lots of dogs like a greet, even more would like some meat. In a pinch some cheese will do. just make sure the meat ain't you.
Actually you shouldn't feed other folks dogs, but for many running along a fence barking seems their primary exercise so I don't mind the barking.