Charca / bootbot

Facebook Messenger Bot Framework for Node.js
MIT License
974 stars 252 forks source link

getUserProfile Permissions as Array #164

Open cKurultayKalkan opened 5 years ago

cKurultayKalkan commented 5 years ago

Hello All,

I got an error about unsufficient permissions when i dont need user gender, local time or others, so changed permissions as a variable array.

See you!

pierreavizou commented 5 years ago

I had the same error, it is probably because facebook recently changed their policy, and after January 8, by default, it will be possible to get only the 'id', 'first_name', 'last_name', 'profile_pic' fields. The other fields will require facebook's explicit approval, see the breaking change notice here : https://developers.facebook.com/docs/messenger-platform/identity/user-profile

So I think that the default fields should only be 'id', 'first_name', 'last_name', 'profile_pic', and the user can still add more fields using the array variable. This would allow us to avoid unexpected errors for users that have not requested permissions to view the other fields.