FaceBook OAuth, Not able to get some of the Email Ids - facebook

I'm developing a Facebook Oauth application.
For my email account of Facebook it is working fine.
but for others (my work mates) accounts it is not working.
It is able to get Facebook first name for them but not the email address.
We have checked the settings for all accounts, it is same as me, but not working.
I have also tried in live environment, but the issue is the same.
Any ideas?

Have you got the email extended permission for the user whose email address you're trying to access? You can check with a call to /me/permissions in the graph API

Also consider that you can read real email also depending on your friends's privacy settings

Related

Are tfbnw.net email addresses suspicious for facebook login

I have a mobile app that allows logging in with facebook, when a user logs in I pull their email from the graph api but I just got a couple of logins with email addresses with #tfbnw.net domains which I guess is for test users while developing on facebook. I didnt generate these so is this someone doing something shady to login to my app or just expected behavior for some users given their settings?
Mobile app coded in react-native, using expo
Those seem to be the internal facebook QA team going through your APPs and manually checking if you're following all facebook's guidelines.
Facebook auditing your app basically.... or at least they did to mine because right after those #tfbnw.net email registrations came in, I checked my facebook app settings and sure enough, I got an alert and an email shortly after. But never received those #tfbnw.net emails before today on any other facebook logins.
I have checked my account and it looks like a generic test user Open Graph Test User gets created automatically, according to which product you enable in your app. It gets created for example, if you enable facebook login or messenger platform.
not something shady IMHO

Facebook connect, get the email

I have a strange behavior on facebook connect using /me?email
I created 2 accounts on facebook
I added differents emails for both account
I put the email to be in public profile for both.
When I connected with the first account I get the email when I try with /me, with the second not. What can be the problem ? Please help me and sorry for my english
Afaik emails need to be verified by Facebook. Also, you need to make sure that each accounts authorized the App with the email permission.

facebook api explorer do not retrive email address

I'm trying to implement signin/-up via facebook, but do not receive email address on request. Sure, I've grabbed the email permission before, but no success.
So I tried with FB Graph API Explorer and again my private account. Yes, access token with email permission, but no email will be delivered, instead "Field is empty or disallowed by the access token".
Access token? Just created, with email permission.
Empty? How could it be, when it is required on signup?
Using a different account of a friend, worked like a charm. Could it depend on my account settings?
Even if the permissions are given, a user can turn Platform off in the Apps Settings. Check the settings and permissions your App is showing, here: https://www.facebook.com/settings?tab=applications&section=opt_out&view
If its alright, you can follow this discussion: Register with Facebook sometimes doesn't provide email
Thanks for answer. I spent a lot of time to figure out what is going on. It seems, that my email address caused the problem, which is facebook#mydomain.com. After changing to a different one, without facebook in it, I get response as expected.

Debugging not receiving some user's email address

I'm an admin of this facebook application. And when user join the app, I have "scope=email" so that my app can read the user's email address.
This is working mostly, but I just found that some player's email are missing in the db.
My question is..
How do I debug and see if facebook is returning email address for this particular user (I have facebook id)? I tried "Graph API Explorer", but it seems that I can only see my own email address.
And how do I get a list of permission that a user has given to my app?
Did more investigations and found that we need the player's access token - an active one.

Using socialoauth to get twitter/facebook data

I'm using socialoauth (http://code.google.com/p/socialoauth/) to implement twitter & facebook logins for a web site. The site is php and mysql based.
I've got logins implemented and working, but I need to get the users screen name or email so that I can store their preferences about my site in a mysql database. I'm not sure how to go about getting their information once I've got the oauth_token and oauth_secret. I couldn't find any documentation or examples using socialoauth, aside from getting the logins working.
I downloaded twitteroauth (https://github.com/abraham/twitteroauth), and mismashed that together with socialoauth.php via this tutorial (http://net.tutsplus.com/tutorials/php/how-to-authenticate-users-with-twitter-oauth/) and was able to get the twitter user's information, but I would prefer to use only socialoauth.php because it does logins for both facebook and twitter.
Specific question: does anyone know which functions in socialoauth are used to get the user's information (hopefully for both twitter and facebook)? I'm very new to this, so it's possible I saw the function I needed while I was looking through the code, and simply didn't recognize it as what I needed.
Twitter does not provide access to users email addresses. The users Twitter screen_name should be returned in the same request you get their access token however.
With Facebook you have to ask for the email permission and then their email address should be accessible with the profile details.