Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
FCL login with Facebook fails #57
In response to comments on this page: https://knpuniversity.com/screencast/oauth/facebook2
This caught me up as well. The call to
According to this post http://stackoverflow.com/questions/32584850/facebook-js-sdks-fb-api-me-method-doesnt-return-the-fields-i-expect-in-gra as of v2.4, there has been a change in the api and it no longer returns all of the fields that it used to by default, you must explicitly request the fields you want.
FCL login with Facebook would not work for me until I changed the api call to
Eggs-cellent course Ryan & Leanna, thanks a bunch!
@codesman - ah, thank you! This one had puzzled me, so I hope this is the solution. The app I created for the screencast is still set to the v2.0 API version, which allows the API calls to be made to this version. If you create a new app, it likely sets the minimum version to the latest version of the API.
@bocharsky-bw Could you update the code (I think it's the step
// before $json = $facebook->api('/me'); // after $json = $facebook->api('/me?fields=email,first_name,last_name');
I just confirmed that this works. We should also probably add a note.