我正在尝试让我的 Facebook 应用向我发送请求或通知。当我按照此处file_get_contents()
所述执行此操作时,我收到“无法打开流”错误。我正在使用的代码是这样的:
//after getting the access token successfully...
$apprequest_url ="https://graph.facebook.com/".$user_id."/apprequests?message='Hi'&".$app_access_token.'&method=post';
$result = file_get_contents($apprequest_url);
当我尝试通过 SDK 做同样的事情时,使用以下代码:
$result = $facebook->api("/MY_USER_ID/apprequests", "POST", $param);
我收到此错误:
All users in param ids must have accepted TOS
但是,我已经授权了该应用程序并且它使用了我的电子邮件地址。我需要请求特定的权限才能使其工作吗?