Php-graph-sdk: Email Permission is granted but email does not return

Created on 7 Feb 2018  路  6Comments  路  Source: facebookarchive/php-graph-sdk

The user granted the 'email' permission, but the email does not been returned.
I've check all declined permissions then I call $helper->getReRequestUrl.
So, all permissions I asked are granted or the user cannot login.

image

I've noted for some those users these permissions are not returned, only firends can have information about the user, and the profile on facebook is displayed like that (Look the "_To see what he shares with friends, send him a friend request._"):
image
image

It was plausible the profile omitted for non-friends could not return some info.
AFAIK, this behaviour is not documented...

Searching for more users with the same problem, I found two users which the Facebook profile is 'wide opened' (see next picture).
For these users, the permission 'friends' returned info.
But email was not returned.
image
image
It happens with 4 from 30 users in one day.
It is very severe...
I found more users with the same problem on issues #922 and #882.
Maybe they could not explain exactly what was their issues and could be the same of mine.

Most helpful comment

Thanks for the report! And special thanks to @gmertk for help solving this issue!

Here what the doc says:
image

So I'm closing this as it looks like not and SDK issue, but a user who changes his/her email adress to an invalid one.

All 6 comments

Hi @leoapsilva, it looks like it is actually related to the platform itself rather than this SDK. If you still get the same response from Graph Explorer https://developers.facebook.com/tools/explorer/145634995501895/ then the issue isn't related to the SDK.

Hi @gmertk, thanks for your reply. But I did not understand what the context of 'the platform itself'.
Could you elaborate more?
If I had the all the users authenticating and granting email permission and facebook 'omitting ' the email I would think it was my code.
But some of them populate the index 'email' of facebook's return array and some does not as I sad.
Do you have any other idea?
Thanks in advance

Hi @gmertk, as you suggest, I found the token of some users the email permission is granted but the email does not return and put on Graph Explorer.
As I expected, the email of this user does not return as you can see below:

image

image

Maybe it is an issue on SDK...

Hi @leoapsilva if you click the "Show" button next to "3 Debug Messages", you can see the warning about missing email. As I mentioned, this isn't about the PHP SDK. Facebook Platform doesn't return the email by design when the email isn't reachable or when the user doesn't have a confirmed email.

Thanks for the report! And special thanks to @gmertk for help solving this issue!

Here what the doc says:
image

So I'm closing this as it looks like not and SDK issue, but a user who changes his/her email adress to an invalid one.

I think this can most commonly occur when someone join using just a phone number too. That's probably more frequent than it used to be so your app needs to test for that scenario.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

flyingcoder picture flyingcoder  路  8Comments

ikishanoza picture ikishanoza  路  10Comments

sempiterna picture sempiterna  路  4Comments

andre-stuart picture andre-stuart  路  3Comments

mohsenshakibafar picture mohsenshakibafar  路  4Comments