0

I am working on a project which requires to display friendlist of my facebook account. When I am assigning me/friends it gives me the number of count of the friends I have in my account, like, {

"friends": { "data": [ ], "summary": { "total_count": 122 } }, "id": "290538796816510" }

I am not getting any names in "data". while, on the other side when I am using "me/friendlists" it only gives me the names of the lists like "close friends", "family", etc. Can anyone tell me how do I get the names of my friends.

Indrajeet
  • 5,490
  • 2
  • 28
  • 43
Snehal
  • 7
  • 4
  • check my answer on this http://stackoverflow.com/questions/25202714/get-friend-list-of-facebook-login-user-in-my-ios-application-using-facebooksdk/25202831#25202831 – Mohit Aug 09 '14 at 10:12
  • I have checked that too.. doesnt work for me – Snehal Aug 09 '14 at 10:25
  • put your code please so we can help according to that – Mohit Aug 09 '14 at 10:26
  • i am not using fb sdk. its json that i am using – Snehal Aug 09 '14 at 10:26
  • SBJSON *jsonparser = [[SBJSON alloc]init]; FbGraphResponse *fb_graph_response = [fbGraph doGraphGet:@"me/friends" withGetVars:nil]; NSString *resultString = [NSString stringWithString:fb_graph_response.htmlResponse]; NSDictionary *firstDictonary = [jsonparser objectWithString:resultString]; NSArray *firstArray = [firstDictonary objectForKey:@"data"]; – Snehal Aug 09 '14 at 10:27

1 Answers1

1

In their last updates, Facebook decided to not allow apps to access the full friend list. Now an app can only see the friends that are already using that app, not the others.

It was a problem for many people, myself included, but it seems that Facebook intends it to work like this. Here is more info:

Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

Community
  • 1
  • 1
Tiago Lira
  • 2,543
  • 1
  • 18
  • 17
  • Ok. Thank you so much.. i will have to use either taggablefriends or invitablefriends to access the list. – Snehal Aug 09 '14 at 11:00
  • No problem! note that taggableFriends requires facebook review, so you can only use it for what they intended (tagging pictures). – Tiago Lira Aug 09 '14 at 11:06