Getting user facebook profile details using ngfb


#1

how to get facebook full profile details of a user using ngfb

This is my code
ngFB.api({
path: ‘/me’
}).then(function (user) {
console.log(JSON.stringify(user));
$scope.user = user;
console.log($scope.user);
}, errorHandler);

Quick help will be appreciated


#2

Follow the steps given the bellow link should solve your problem. It worked for me as well.

https://ccoenraets.github.io/ionic-tutorial/ionic-facebook-integration.html


#3

Thank you for your reply baviskarmitesh.I have already tried that steps only for fb integration thats worked fine but after login i using ngFB.api({
path: ‘/me’
})
for getting user profile details from facebook but i am only getting username,id only ,so how can i get their profile details like email,etc…


#4

in the code part

.controller(‘ProfileCtrl’, function ($scope, ngFB) {
ngFB.api({
path: ‘/me’,
params: {fields: ‘id,name’}
}).then(

add additional fields like email photo and etc. then only in reply you will get that info


#5

I have tried it.That’s working fine for me .thank you very much baviskarmitesh.Can you send me the param fields for other details


#6

refer FB API documents from developer.facebook.com


#7

ok thanks baviskarmitesh