Can somebody cast animal friendship on a druid who has used wild shape and have it affect them like it would an ordinary Beast?
The short answer is yes, if your druid has less than 4 intelligence.
The spell lists one requirement for targeting and an additional requirement I'll talk about.
PHB, page 212, Animal Friendship:
Choose a beast that you can see within range, It must see and hear you. If the beast's Intelligence is 4 or higher, the spell fails.
For the first requirement — creature type — Druids' Wild shape does cause the player's creature type to change to beast.
PHB, page 67:
... Your game statistics are replaced by the statistics of the beast, but you retain your alignment, personality, and Intelligence, W isdom , and Charisma scores. You also retain all of your skill and saving throw proficiencies, in addition to gaining those of the creature...
This makes clear that your natural statistics are replaced by the beasts statistics including creature type.
For the additional requirement, the Druid maintains it's normal humanoid Intelligence. What this means is if your druid has at least 4 intelligence and is in wild shape the spell WILL fail, but it still works as if you'd cast the spell on a beast with at least 4 intelligence as normal.
Only if the druid in question has an intelligence score of 3 or less. The Animal Friendship spell description states that the spell fails if the beast has a 4 or greater intelligence, and the Wild Shape ability states that the wild shaped druid retains his own intelligence (and wisdom and charisma) score.