K
K
k0rzhik2010-11-10 23:26:31
JavaScript
k0rzhik, 2010-11-10 23:26:31

Facebook API friends.get?

Good evening.
The problem is with the facebook api, and with the friends.get (uid ) function. At the time of authorization through FB on my site, extended rights are requested

FB.login(handleSessionResponse, {<br/>
 // <a href="http://developers.facebook.com/docs/authentication/permissions">developers.facebook.com/docs/authentication/permissions</a><br/>
 perms: [<br/>
 'offline_access',<br/>
 'user_about_me',<br/>
 'friends_about_me',<br/>
 'friends_interests',<br/>
 'user_interests',<br/>
 'friends_location',<br/>
 'user_location',<br/>
 'friends_online_presence',<br/>
 'user_online_presence',<br/>
 'email, read_stream, publish_stream, offline_access, status_update, photo_upload, create_event, rsvp_event, sms, video_upload, create_note, share_item'<br/>
 ].join(',')<br/>
 });

And it seems that the user gives access to his friends offline. It appears in friends.appUsers.
But here's the trick.
FB.api({ method: 'friends.get', uid: 'айди пользователя, предоставившего все права моему сайту' }, function(result) {<br/>
 console.log(result)<br/>
 })<br/>

Resukt gives error #240 - Requires a valid user is specified (either via the session or via the API parameter for specifying the user.
But how is it, if the user himself gave all the permissions, and the ID is set correctly? And this does not work not only on my site, but also through the FB test console (where you need to enter the parameters in the forms :)).
Any ideas?
PS It should work like this: User P1 gives access rights to his friends. Then I go to the site and give access to my friends. If P1 is in my friends list, then I want to display a list of his friends (he also gave the rights to offline access to his friends)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
exIV, 2010-11-11
@exIV

1. What kind of rights are you asking for??? usually enough publish_stream + all default ones...
2. use FQL, download examples, everything is there...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question