How to get user profile info using access token in php-sdk
I want to get user profile using access token that i have already generated , and if the access token is invalid it shoud display error. anyone can help to do this ? i want php code to handle this. i am waiting.... Since you already have the access token , the simplest and clean way would be- $user_details = "https://graph.facebook.com/me?access_token=" .$access_token; $response = file_get_contents($user_details); $response = json_decode($response); print_r($response); First check if the user is logged in $facebook = new Facebook(array( 'appId' => 'AppIDHere', 'secret' => 'AppSecretHere', ));