-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emails are empty #91
Comments
` ` |
router.post( |
Did you try use |
not worked |
Client Requests: FB.login(
function(response) {
if (response.status === 'connected') {
axios
.get('http://0.0.0.0:3000/auth/facebook/token', {
params: {
access_token: response.authResponse.accessToken,
},
})
.then(({ data }) => {
console.log('data =', data);
});
} else {
// The person is not logged into your webpage or we are unable to tell.
}
},
{ scope: 'email' },
); Use in Vue: <template>
<FacebookLogin app-id="XXX" version="v9.0" @login="fbLogin" />
</template>
<script>
import FacebookLogin from 'vue-facebook-login-component';
import axios from 'axios';
export default {
components: {
FacebookLogin,
},
methods: {
fbLogin({ authResponse }) {
axios
.get('http://0.0.0.0:3000/auth/facebook/token', {
params: {
access_token: authResponse.accessToken,
},
})
.then(({ data }) => {
console.log('data =', data);
});
},
},
};
</script> |
I recently started using this framework as well and experienced the same issue as you are having with the email not being present. I was using a Facebook test user and got the access token through the Facebook API dashboard. The first thing I noted with your code is that the router should use
I am not sure this fixes anything for you. My next problem was that my test user did not have the email permission for some reason. You can check the permissions by sending a request to the following URL. (With your access token as your Authorization parameter):
What fixed it for me was using my own user instead. (I still have not figured out why this is happening to the test user). Hope this helps |
Even though I have the access_token with email access and i have write the scope of email in passport it's not getting the email of the user.
The text was updated successfully, but these errors were encountered: