I’m doing it on ios. When I get a user’s info(gendar,locale,etc), such as Bill Gates(216311481960), it will return error. Maybe because these info are not public. If I just get name,link, picture, that will be OK. But how can I handle this kind of error. How can I know which info can be retrieved?
Thanks.
Without a user access token, pubic info can be grabbed this way:
http://graph.facebook.com/216311481960As you can see this doesn’t appear to be user information, but rather page information.
For user information, you need to use a Facebook user id. Zuck’s is 4…so do:
http://graph.facebook.com/4Notice how it has both first_name and last_name, while the “Bill Gates” one you have as an example is clearly not a “user” but a page.
With a valid user access token, all shared information can be grabbed this way:
http://graph.facebook.com/me?access_token=ValidUserAccessToken