I am trying to do a very basic thing with the new Graph API.
I already know how to get my friends: "https://graph.facebook.com/me/friends?access_token=4333ed34d..."
But if I have a friend who's ID is 123456, then I want to get his friends : "https://graph.facebook.com/123456/friends?access_token=4333ed34d..."
But I get an exception:
"The remote server returned an error: (500) Internal Server Error."
Why can't I do that? It's a very trivial task to ask from the API.
you can actualy steal the information from public facebook. It's not pretty, takes a couple seconds, but works.
I have a JS code that runs from console and makes AJAX request - the same facebooks makes when requesting more friends in the regular facebook UI when you scroll down (http://www.facebook.com/profile.php?sk=friends). Then I parse the result. So far it works flawlessly. I just ask for more friends and when I don't get a match, I know I have them all.
I don't want to share the whole code, but this is the essential part:
You can get the neccesary variables from a currently logged in user like this:
I understand this is probably useless for your case since this is JS. Anyway, someone might find this usefull.
P.S.: $jq = jQuery. P.P.S.: those job objects take care of sequential ajax requests. I found out I need them since my FF didn't feel like making 2000+ AJAX request at the same time :-D
If I try to get friends of a random user I get HTTP 500 but it contains this response:
which is pretty self-explanatory.
If I try to get friends of my friend who allows viewing his other friends it works fine. If my friend chose to not allow viewing his other friends I get the same error.
I got friends of friends(limited). I had same problem. Though it is very late for answering question, it will help somebody. That's why answering this question.
We can get friends of friends those are app users. It needs following requirements:
$fb_id= user id whose friends of friends required.
Try this fql query.
You just can't do that.
If you require the appropriate extended permission when the users authorize your app, you can access some data of the currently logged user's friends, but that's all you get (http://developers.facebook.com/docs/authentication/permissions see: friends_xxxx permissions), but not his/her friends.