Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Get user FB friends data by itsa access token in php

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 375
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: