我已经做了一个应用程序,为某一特定原因注册用户。该应用程序从他们的FB帐户中获取电子邮件和姓名。
39: $token_url = "https://graph.facebook.com/oauth/access_token?client_id=".$app_id."&redirect_uri=".urlencode($my_url)."&client_secret=".$secret."&code=".$code;
40: $access_token = file_get_contents($token_url);
41: $graph_url = "https://graph.facebook.com/me?fields=id,name,email&".$access_token;
42:$user = json_decode(file_get_contents($graph_url));我在第40行和第42行中出现了一个错误
[function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /home/*********/index.php on line 40
[function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /home/*********/index.php on line 42但是,只有在试着评估用户给出的字段之后,而不是在第一次启动应用程序时,才会这样做。这里是否有此代码中的错误,还是应该在脚本中查找其他地方?
https://stackoverflow.com/questions/13789115
复制相似问题