file_get_contents 给出了这个错误:
Warning: file_get_contents(https://graph.facebook.com/oauth/access_token?client_id=&client_secret=fe9f106b05f6ab737a67ccc94a782767&grant_type=client_credentials) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /home/filevanc/public_html/scripts/cpa/facebookvirallink.php on line 25
这是第 25 行:
$cred = file_get_contents("https://graph.facebook.com/oauth/access_token?client_id=$appID&client_secret=$secret&grant_type=client_credentials");
我也尝试过对 file_get_contents 使用不同的方法,如下所示:
$opts = array('http'=>array('header' => "User-Agent:MyAgent/1.0\r\n"));
$context = stream_context_create($opts);
$response = file_get_contents($domain,false,$context);
但这给出了同样的错误。
关于我还能尝试什么的任何建议?