我想让我的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);
执行此操作时,我收到“无法打开流”错误。我正在使用的代码是:
$result = $facebook->api("/MY_USER_ID/apprequests", "POST", $param);
当我尝试通过SDK执行相同的操作时,使用以下代码:
All users in param ids must have accepted TOS
我收到此错误:
{{1}}
但是,我已经授权该应用程序并且它已经使用了我的电子邮件地址。我需要获得特定权限才能使其成功吗?
答案 0 :(得分:2)
这意味着$user_id
用户未使用您的应用 - 您只能将app->用户请求发送给应用的现有用户