问题
My server is able to publish posts on my Facebook app wall. But I would like to publish comments on user writing on the wall... When trying to post a comment to a given post ID I always get the following:
{"error":{"type":"OAuthException","message":"(#200) The user hasn't authorized the application to perform this action"}}
However I gave all possible authorization as a test user to this app. Any suggestion ?
Addition.
I also tried to use the method described here The URL I'm using looks like this
curl_setopt($ch,CURLOPT_URL,'https://graph.facebook.com/'.$comment['id'].'/comments?'.$access_token)
Now I get the following message
{"error":{"type":"OAuthException","message":"(#100) Invalid fbid."}}
回答1:
OK found my own solution, but for the record since some people my stumble like me :
- first you need to apply this awesome authentification method.
- need to call facebook with the following
curl_setopt($ch, CURLOPT_POSTFIELDS, '&message=hello World');
curl_setopt($ch,CURLOPT_URL,'https://graph.facebook.com/'.$post['id'].'/comments?'.$access_token);
回答2:
If you can give some code, this would help. however, this is resulted usually from 3 reasons:
- The user hasn't installed your app.
- You didn't specify a VALID OAuth access token for this session with the query you performed.
- You don't have the
publish_streamfrom the user, which you need to publish.-You said you have this, but did you specify this specific permission?
回答3:
My dear take the permission of publish_stream from the user. the error is just because of that. you can take publish stream like this
<fb:login-button perms="publish_stream" autologoutlink="true"></fb:login-button>
来源:https://stackoverflow.com/questions/4877847/publishing-comments-on-my-facebook-app-profil