Reputation: 1704
I have integrated Facebook
SDK in my application.
I want to get the list of the Facebook friends who have installed my app. The list should contain their details such as Facebook email id, Facebook name, etc.
I am using graph api 2.5
.
How can I achieve this?
Any help would be appreciated.
Upvotes: 0
Views: 882
Reputation: 1704
Try this code..this code work for you got friend who install your app.
Refer this link for more information you got a id & name
FBSDKGraphRequest *Fbrequest = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/me/friends"
parameters:@{ @"fields": @"id"}
HTTPMethod:@"GET"];
[Fbrequest startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
NSLog(@"%@",result);
}];
output:
Upvotes: 1
Reputation: 4337
You can not get email of your friend. You can see in this link: Permission
You just get email of user who allow your app get email. And no way for you get friend of this user's email.
And you can see at invite friend: Invite Friend
My app needs the list of someone's friends that don't use the app. Can I have access to this info?
The list of someone's friends who don't use your app is no longer available in v2.0. However, you can still enable people to tag friends using the Taggable Friends API. Also, If your app is categorized as a game and you have a presence on Facebook Canvas, you can use the Invitable Friends API to render a custom invites dialog within your game. However, you'll still need to pass the tokens returned by the Invitable Friends API to the Requests Dialog to actually send the invites.
My app needs to access detailed info from friends' profiles such as friends photos, likes, and so on. Can I have access to this info?
We've removed access to friends' data in v2.0. However, we still support tagging friends through a new Taggable Friends API that you can use in your app.
Upvotes: 1