Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $jsonurl = 'https://graph.facebook.com/oauth/access_token?client_id='.$consumerKey.'&client_secret='.$consumerSecret.'&grant_type=fb_exchange_token&fb_exchange_token='.$post['accesstoken'];
- if (ini_get('allow_url_fopen')) {
- $jsondata = @file_get_contents($jsonurl);
- }else if(extension_loaded('curl')){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $jsonurl);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // added by sabuj
- $jsondata = curl_exec($ch);
- curl_close($ch);
- }else{
- echo 'Server not congiured for \'Content Grabbing Technique';
- return;
- }
- //var_dump($post);
- //$accesstoken = explode('&',@file_get_contents('https://graph.facebook.com/oauth/access_token?client_id='.$consumerKey.'&client_secret='.$consumerSecret.'&grant_type=fb_exchange_token&fb_exchange_token='.$post['accesstoken']));
- $accesstoken = explode('&',$jsondata);
- $accesstoken = explode('access_token=',$accesstoken[0]);
- $oauth->accesstoken = $accesstoken[1];
Advertisement
Add Comment
Please, Sign In to add comment