julianlam / nodebb-plugin-sso-facebook

Single Sign-On Plugin for NodeBB
BSD 2-Clause "Simplified" License
19 stars 19 forks source link

Custom made profile picture url doesn't work in recent fb graph api #25

Open sarim opened 8 years ago

sarim commented 8 years ago

The plugin uses 'https://graph.facebook.com/' + profile.id + '/picture?type=large' for profile picture. But in facebook api v2.0 facebook user's user id's aren't real anymore.

Ref: https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids

App-scoped User IDs Facebook will begin to issue app-scoped user IDs when people first log into an instance of your app coded against v2.0 of the API. With app-scoped IDs, the ID for the same user will be different between apps.

So the custom made pro pic url doesn't work anymore. For it to work, the plugin needs to call me/picture?type=large then download the picture from the url.

I'll work on a PR.