By knowing the token value and fbid we can get the data of friends in a file which we can use use further in our code.
For example:
$post_decode = $this->request->input ( 'json_decode', true) ;
$fbid = $post_decode['fbid'];
$token = $post_decode['token'];
$file=file_get_contents('https://graph.facebook.com/me/friends?access_token='.$token);
$post_decode = json_decode($file) ;
$friends = $post_decode->data;
Here all the friends information is now in $friends array.
0 Comment(s)