我正在通过我的开发人员测试帐户处理应用程序,我所做的所有工作都是试图向我的用户发布测试通知。我做这个使用Facebook要求2.0文档,所以我的代码如下所示:Facebook请求2.0错误#200参数ID中的所有用户都必须接受TOS
$token_url = "https://graph.facebook.com/oauth/access_token?" .
"client_id=" . $app_id .
"&client_secret=" . $app_secret .
"&grant_type=client_credentials";
$app_access_token = file_get_contents($token_url);
$user_id = $this->user->id;
$apprequest_url ="https://graph.facebook.com/" .
$user_id .
"/apprequests?message='testing notification'" .
"&" .
$app_access_token . "&method=post";
$result = file_get_contents($apprequest_url);
echo "Request id number: " . $result;
当我这样做,我得到的是说在网页上的错误“未能打开流”,但是当我复制和将网址粘贴到地址栏中我不会收到任何错误并返回请求ID。任何人都知道为什么会发生这种情况?