问题
I am trying to get my Facebook app to send me a request or notification. When I do this with file_get_contents()
as described here, I get a "Failed to open stream" error. The code I'm using is this:
//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);
When I try to do the same thing through the SDK, with this code:
$result = $facebook->api("/MY_USER_ID/apprequests", "POST", $param);
I get this error:
All users in param ids must have accepted TOS
However, I have authorized the app and it has used my e-mail address.Is there a specific permission I need to request to make this work?
回答1:
It means the $user_id
user doesn't use your app - you can only send app->user requests to existing users of your app
来源:https://stackoverflow.com/questions/14508229/all-users-in-param-ids-must-have-accepted-tos-error