Facebook Email field return null (even if the “email” permission is set and accepted) part 2 -


Here is a topic describing my primary problem.

In short: The problem is that in some cases, facebook-graph-api does not return the user's email address

Other Stackoverflow friends suggested using their Facebook email If it is the user's name (i.e. the username @ Facebook dot) which I have done but what to do if the Facebook user does not even have a "username"

What would you recommend? Asked at his email address to reach the page?

The Facebook API does not return the email address, there are several reasons for this. In the discussions such as the various solutions were proposed to handle this matter, but I think the userName@facebook.com Do not use / code> is a good solution, because it is not a valid email, and usernames can not be available either, and when you try to send an email to the user, Then it will fail to distribute, etc.

Asking a user's email address is also not a good thing, because some users can refuse to provide their email.

I have a fake mail such as uid@facebook.yourdomain. Com where uid is a user id that is always guaranteed to return from Facebook, and your domain's subdomain where you want it to be, such as you can handle such fake emails.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -