Note that there are some explanatory texts on larger screens.

plurals
  1. POget friends after a specific id using facebook graph api
    text
    copied!<p>I am using facebook graph api to get details of my friends . I wanted to get details of my friends after a specific user id for eg i have 4 friends </p> <pre><code>uid name 1 Rob 2 Ryan 3 Bob 4 Angelina </code></pre> <p>Now i want to get details of my friends after user id 2 means of user id 3 and 4 and so on .</p> <p>I used the following graph search query</p> <pre><code>$url = 'https://graph.facebook.com/'.$user.'/friends?uid&gt;=2'; </code></pre> <p>But it does not seems to be working . I searched a lot for this but no information . There is a option for limit but no option to perform what i want. Any help on this ? Below is my full code </p> <pre><code> function getFacebookFriends_more($criteria='') { $name = $criteria['name']; $load_me_more_id = $criteria['load_more_id']; if($name=='') $name = 'me'; $url = 'https://graph.facebook.com/'.$name.'/friends?uid&gt;='.$load_me_more_id.'fields=gender,name&amp;access_token='.$this-&gt;getAccessToken(); $content = $this-&gt;getDataFromUrl($url); $content = json_decode($content,true); $users = $this-&gt;formatFacebookUsers_more($content,$load_me_more_id); return $users; } function formatFacebookUsers_more($content,$load_me_more_id) { for($i=0; $i&lt;count($content['data']); $i++) { $id = $content['data'][$i]['id']; $name = $content['data'][$i]['name']; $gender = $content['data'][$i]['gender']; $url = 'http://www.facebook.com/profile.php?id='.$id; $picture = 'https://graph.facebook.com/'.$id.'/picture?type=large'; //square, small, large $users[$i]['id'] = $id; $users[$i]['name'] = $name; $users[$i]['picture'] = $picture; $users[$i]['url'] = $url; $users[$i]['gender'] = $gender; } return $users; </code></pre> <p>}</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload