maciekmm / messenger-platform-go-sdk

:envelope: A GO SDK for Facebook's messenger-platform: https://developers.facebook.com/docs/messenger-platform
MIT License
110 stars 27 forks source link

Changed field name from profile_pic to picture #29

Closed catoaune closed 7 years ago

catoaune commented 7 years ago

Got an error using profile_pic "(#100) Tried accessing nonexisting field (profile_pic) on node type (User)" while picture is working

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 92.875% when pulling 9a9c465c6a630c03b083f277889b9dcc21ac889f on catoaune:catoaune-patch-1 into 71a3a43148e3c5a2d20ceb133aed0faefd92ed34 on maciekmm:master.

maciekmm commented 7 years ago

@catoaune Thanks for your contribution.

maciekmm commented 7 years ago

@catoaune I just tested this because something seemed wrong (the messenger platform documentation mentions profile_pic) and it indeed is profile_pic. I reverted the commit. Could you provide more information of the context of this error?

catoaune commented 7 years ago

I am sorry for providing a bad patch. I was working on messenger for Workplace by Facebook and got an error when using profile_pic, while picture did work. I did try to search in the regular Facebook messenger developer documentation to see if profile_pic had been replaced by picture in recent API versions. I found this document - https://developers.facebook.com/docs/graph-api/reference/user - and based on this "picture The person's profile picture" and the fact that it did work with picture in Workplace, I assumed it had changed also in the regular messenger API. Of course I should not just assume but also test, and I am sorry for that.

maciekmm commented 7 years ago

@catoaune No worries :) Is this library of any help when developing for 'messenger for Workplace'? If so maybe adding a flag to support that product would be a good idea? :>