Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
126
rated 0 times [  133] [ 7]  / answers: 1 / hits: 55141  / 11 Years ago, sun, may 19, 2013, 12:00:00

Edit: Not Duplicate, because:




  • I have the permission

  • Debugged the token

  • Code works with test user



Please don't mark as duplicate without reading.



I'm trying to get the user e-mail address, but i don't get it. On graph api explorer, when i hit send, email field becomes grayed and says that:




field is empty or disallowed by access token




But when I debug the token it has email permission granted



My profile has an e-mail address.



Update: I tried https://developers.facebook.com/tools/console/ . My profile returns nothing, even on another computer. But the same code returns the email, name and uid of another account.



Code:



    <fb:login-button scope=email>
Grant Permissions to make more examples work
</fb:login-button>

<button onclick=doPost()>Post to Stream</button>

<script>
function userData() {
FB.api('/me?fields=name,email', Log.info.bind('/me callback'));
};

FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
userData();
}
});
</script>


It is possible to lockdown you e-mail so no one can has it? Even when i grant permission?


More From » facebook

 Answers
13

After i got my bug report marked as duplicate, and i read all posts and links there, i got what caused this problem for me and how to fix.



The Problem
Facebook seems to sometimes forget what your primary e-mail is on the graph API (But it still there in the preferences.)



Solution
The user affected must remove the e-mail, save settings, then re-add the address, re-confirm, then make it primary. This fixed my account both on my sandbox app, and other apps where Facebook login don't used to work.


[#78144] Friday, May 17, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leog

Total Points: 225
Total Questions: 113
Total Answers: 118

Location: Oman
Member since Wed, Apr 12, 2023
1 Year ago
;