Skip to content
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

Getting only full name and id of fb user on fetching public profile #1092

Open
nithindan opened this issue Aug 17, 2015 · 8 comments
Open

Getting only full name and id of fb user on fetching public profile #1092

nithindan opened this issue Aug 17, 2015 · 8 comments

Comments

@nithindan
Copy link

Hi,

I'm using this plugin for fb login in my phonegap app.

I got all details like first name,last-name,email etc on fetching public profile using following code

$cordovaFacebook.api("me", ["public_profile","email"])
.then(function(success) {
}
.error(function(data, status, headers, config) {
}

But now i'm getting only id and full name as response.

what is the issue ?

Thanks in advance

@kaushiik
Copy link

Hi,

I am facing the same problem. What's the problem?

@MartinKip
Copy link

If you want that kind of information, you have to request it from the graph api. You will have to ask for the first_name, last_name, email and so on seperatly.This plugin has a function to access this graph explorer.

@kaushiik
Copy link

kaushiik commented Sep 2, 2015

Thanks MartinKip.

@nithindan
Copy link
Author

Hi,
This issue is from fb api verison 2.4
So you need to specify the fields. I have solved this issue by giving fields like this
$cordovaFacebook.api("me?first_name,last_name"

@kaushiik
Copy link

kaushiik commented Sep 2, 2015

Thanks nithindan. Yes it is working now.

@coder422
Copy link

coder422 commented Sep 9, 2015

i have used java code for facebook login in my application.But i'm getting same problem(getting only id and name) ,how can i get email and first name of that particular user.can any one please help me to solve my issue.

Thanks in advance.

@nithindan
Copy link
Author

Hi lokesh,
You need to specify the fields that you needed in you request.

Search for "Declarative Fields" in the changelog: https://developers.facebook.com/docs/apps/changelog#v2_4

@lfv89
Copy link

lfv89 commented Sep 9, 2015

@nithindan

Thanks for your help.
Your code is incomplete though. The corrected version should be:

$cordovaFacebook.api("me?fields=first_name,last_name") ...

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

No branches or pull requests

5 participants