HTTP 400 error while accessing friend list in Facebook chart API

When I access my friends list using the URL https://graph.facebook.com/me/friends?access_token= ... I can see my friends list. I can also do this programmatically.

Now, when I take the ID of any of my friends and replace it with “me” in the above URL and paste the URL in the browser, I can see my friend’s friends. I cannot do this programmatically because it gives me an HTTP 400 ERROR.

Does anyone know why this is possible by pasting a URL instead of programmatically?

+3
source share
2 answers

You cannot get “friends of friends” using facebook api.

, /me/friends API- Graph API, . FRIEND_ID/, :

{
  "error": {
    "message": "(#604) Can't lookup all friends of FRIEN_ID. Can only lookup for the logged in user or the logged in user friends that are users of your app.", 
    "type": "OAuthException", 
    "code": 604
  }
}

, . , , 400 .


" " , , (), , (), (USER_ID/friends), , URL-, , "Test_console".

? URL- (USER_ID/friends? Access_token = xxxxx), Facebook Debugger "", .

, , , "", , , , "".

, .

+3

(), . . , -. .

, .

$fb_id = , .

fql.

$query = "SELECT uid, name, work_history FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 IN (SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = $fb_id) is_app_user = 1))";

:

  • .
  • read_stream, publish_stream, publish_checkins.
0

All Articles