Print this page

External authentication provider Facebook is not returning some fields

Knowledge Article Number 000231312
Description Problem Description:

Customer created a Facebook app in Facebook and an Auth Provider in Salesforce to connect to facebook.
When consumer key and secret are specified in Auth Provider, they got less user info in response.

<user>
<full_name>Tom Jerry </full_name>
<id>1228965403786569</id>
<portal_id>000000000000000</portal_id>
<provider>Facebook</provider>
<org_id>00DB00000001W9E</org_id>
</user>

When they remove consumer key, secret and scope in Auth Provider, they got more user info which includes first name, last name, email etc.

Customer wants to use their own Facebook app and expect to get user first name, last name, email info.



Cause:

When customer specify consumer key and secret, salesforce authenticate to the app customer created.
When consumer key, and secret are not specified, we use Salesforce default facebook app.

Customer's facebook app is newly created. It is App V2.5.
Salesforce facebook app is v2.2 (you can see this in .har file)

Facebook changed API behavior on userinfo since v2.4.
See https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/

Fewer default fields for faster performance: To help improve performance on mobile network connections, we've reduced the number of fields that the API returns by default. You should now use the ?fields=field1,field2 syntax to declare all the fields you want the API to return.




 
Resolution Solution/Workaround:

Change "User Info Endpoint URL" in Auth Config from "https://graph.facebook.com/me" to "https://graph.facebook.com/me?fields=first_name,last_name,email"




promote demote