1

I want to fetch birthday of Facebook friends.I am using graph api, i know that i have to use me/friends of graph API. But the problem is that whenever i pass url like

https://graph.facebook.com/me/friends?[ACCESS TOKEN]&fields=id,name,picture,gender,birthday

It gives data which contain fields like name,id,picture and gender only but its not showing birthday field. Any idea, how to fetch the desired result.

3
  • go through this link: stackoverflow.com/questions/8645911/…
    – iMash
    May 24, 2012 at 11:34
  • i have gone through link,tried both case - first one was displaying all the fields except birthday field nd in 2nd case, birthday field was coming null.
    – iCoder4777
    May 24, 2012 at 13:08
  • Birthday field coming back as null coul also me that the friends have not given permission for friend’s apps to have access to that data …
    – CBroe
    Jul 8, 2012 at 11:06

4 Answers 4

2

You should take extended permission friends_birthday

Then the above query works.

FYI:
Extended permissions
User Object - check birthday field

1
  • I have checked this read two times but even then m not getting why my birthday field is coming null.
    – iCoder4777
    May 24, 2012 at 13:06
1

You can get friends_birthday using the graph API:

[facebook requestWithGraphPath:@"me/friends?fields=id,name,gender,picture,birthday" andDelegate:self];

and add permissions like this:

_permissions = [[NSArray arrayWithObjects:@"read_friendlists",@"publish_stream ,user_checkins", 
             @"friends_checkins", @"publish_checkins",@"email", nil] retain]; 
0
Now Facebook give permission for user_birthday only if you submit your app in developer.facebook.com for review. If Facebook give permission to your app after successfull review then you will find user_birthday live.

Then use NSString *urlString = [NSString stringWithFormat:@"https://graph.facebook.com/me?access_token=%@&fields=email,name,gender,picture,birthday,relationship_status", token.tokenString];

0
-1

me/friends?fields=id,name,picture,birthday

Try that in graph api explorer, to test your permissions.

Works fine for me.

Ps. Don't forget to select friends_birthday and generate your access key.

1
  • This answer is only saying that you tried what the asker did with success, but does not provide a solution.
    – zachjs
    Oct 11, 2012 at 0:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.