Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook graph api returns no email

I'm calling

https://graph.facebook.com/<user_id>/?access_token=<valid_token>

or just

https://graph.facebook.com/me/?access_token=<valid_token>

and getting back json object that doesn't contain primary user email which I need. I setup email permission for the app and no effect. What can be wrong?

like image 792
heximal Avatar asked Jan 03 '13 13:01

heximal


People also ask

How do I get data from Facebook Graph API?

Open the Graph Explorer in a new browser window. This allows you to execute the examples as you read this tutorial. The explorer loads with a default query with the GET method, the lastest version of the Graph API, the /me node and the id and name fields in the Query String Field, and your Facebook App.

Is Facebook Graph API deprecated?

Applies to all versions. Facebook Analytics will no longer be available after June 30, 2021. Additionally, we are deprecating the App Dashboard Plugin for Marketing API. For more information visit the Business Help Center.

How do I get Facebook Page Insights on graph API?

Getting Page InsightsIn the Graph API Explorer, click the "Get Access Token" button to obtain the read_insights and manage_pages permissions (listed under "Extended Permissions"). Click "Submit" to retrieve the list of Pages that you admin now that you have a valid access token.


1 Answers

It is possible that the email is not verified in facebook. In this case facebook doesn't make it available via the API. Make sure your code handles this case.

like image 84
lex82 Avatar answered Nov 11 '22 17:11

lex82