Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Not able to get user email id #19

Open
wdayanand opened this issue Nov 18, 2019 · 1 comment
Open

Not able to get user email id #19

wdayanand opened this issue Nov 18, 2019 · 1 comment

Comments

@wdayanand
Copy link

wdayanand commented Nov 18, 2019

I need email in my game for further communication like rewards, notification, etc
but as per document I didn't see any way to get email I tried with javascript sdk using
FB.login(function (response) {
if (response.authResponse) {
FB.api('/me?fields=email', function (userInfo) {
console.log(userInfo.email);
});
} else {
console.log('Auth cancelled.')
}
}, {
scope: 'email'
});

but i always got Blocked opening error ="in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set"

Please let me know How i can get user email id

@hjp709394
Copy link

Per discussion at the thread:
https://stackoverflow.com/questions/53494945/fetch-the-user-information-with-the-permission-into-facebook-instant-game
One must use the relevant FBInstant methods (e.g. FBInstant.player.getName()) to get player information. And it is currently not possible to access the player’s email address and gender from within Instant Games.

Let me know if you have further questions. Thanks.
cc @chrishawkins

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants