Reputation: 11214
Consider the following: Friend with ID 1 is in a relationship and has his birthday data filled in as well Friend with ID 2 is also in a relationship and has his birthday data filled in too
Both of users with ID 1 and 2 are friends and if I login to Facebook, I can see the above mentioned information without any problem.
Then I make a call to the Graph API using the Facebook SDK, so I make something similar to:
$this->_facebook->api("/1");
For this ID, in the returned array I can see the relationship status, the birthday etc.
However
$this->_facebook->api("/2");
does not return this information, only the absolute basics such as 'name', 'id' and 'gender' - I'm using a simple print_r() statment to dump the returned array. When initiating the login I send the right permissions via the 'scope' parameter (and hence I can see the information belonging to user with ID 1).
So the question is: If I see the birthday and rel status for both users on the interface, why I only see one via the api calls?
Upvotes: 0
Views: 135
Reputation: 43816
I'm assuming in your example there, that user '1' uses your app or is a friend of a user of your app (assuming you have the appropriate friends_* permission)?
Other users' information won't be available via the API - even if you can infer that information through other pieces of data you have access to - in general you can only access data on behalf of your app's users and their friends, and privacy settings can override what you can access about your users' friends, even if your user can see the info on facebook.com
Upvotes: 2