Although I have heard this tale in various forms, the first time I heard it was in an old Western told by the character 'Nobody' in the 1974 Sergio Leone classic "My Name Is Nobody" starring Henry Fonda and Terence Hill.
The story goes like this:
One cold and frosty morning in early Spring a young birdie lay on the ground shivering and nearly frozen.
A cow saw him there and decided to help the poor birdie out, and promptly covered him with a huge 'cow pie'.
The defecation, while smelly was also very warm and soon the birdie was singing with all his might. The warmer he got the louder he began to sing.
About this time a coyote,attracted by the singing, jumped out from behind a boulder and snatched the birdie from the pile and quickly devoured him.
The moral of the story is that not everyone who Shits on you is your enemy, not everyone that pulls you out of the shit is your friend, and if you are happy in a pile of shit keep your mouth shut