Login for Server-side Apps (Facebook PHP SDK) -


i following technical guide.(https://developers.facebook.com/docs/howtos/login/server-side-login/)

i stuck in between step 6 , 7. can me?

as file_get_contents() not work, wondering if change part

 $response = file_get_contents($token_url);  $params = null;  parse_str($response, $params); 

to

 $response = curl($token_url);  $params = null;  parse_str($response, $params); 

whereas curl function is:

  function curl($url) {   $ch = curl_init();   curl_setopt($ch, curlopt_header, 0);   curl_setopt($ch, curlopt_returntransfer, 1);    curl_setopt($ch, curlopt_url, $url);   $data = curl_exec($ch);   curl_close($ch);   return $data; 

thanks ceejayoz, have found out error.

when print out $token_url, found out variables wrongly formatted causing error. careless.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -