If you configure FaceBook social authentication using the common task in AM, you do not get the first name, last name and other fields returned.
This is because of a relatively recent change to the FaceBook API.
In AM 13 the User Profile Service URL defaults to: https://graph.facebook.com/v2.1/me
However, the FB API has changed as explained here:
The API version of the app registered at Facebook was v2.4.
With API 2.4, Facebook has reduced the number of fields that the API returns by default. We now need to use the
?fields=field1,field2 syntax to declare all the fields we want the API to return.
More details : https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/
In my particular setup I was able to get additional attributes of logged in user by setting “User Profile Service URL: ” in Facebook Module as
So this should really look something like depending what fields you want returned:
User Profile Service URL: https://graph.facebook.com/v2.4/me?fields=email,first_name,last_name,name
This isn't mentioned in the documentation. I suggest that:
- We update the default User Profile Service URL to reflect this in AM
- We update the documentation to explain this: https://backstage.forgerock.com/#!/docs/openam/13/admin-guide/chap-auth-services#configure-social-authn (though we may need specific FaceBook documentation added because what we have looks generic to social auth)