0

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."}}

Community
  • 1
  • 1
millebii
  • 1,277
  • 2
  • 17
  • 27

3 Answers3

1

OK found my own solution, but for the record since some people my stumble like me :

  1. first you need to apply this awesome authentification method.
  2. 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);

Community
  • 1
  • 1
millebii
  • 1,277
  • 2
  • 17
  • 27
0

If you can give some code, this would help. however, this is resulted usually from 3 reasons:

  1. The user hasn't installed your app.
  2. You didn't specify a VALID OAuth access token for this session with the query you performed.
  3. You don't have the publish_stream from the user, which you need to publish.-You said you have this, but did you specify this specific permission?
Tom Granot
  • 1,840
  • 4
  • 22
  • 52
  • Since I'm testing, the only user is my personnal facebook profile. As a user I gave the authorization to publish on my stream. However want I want to achieve is to comment the applications profile wall. I have been able to put a post on the app wall, but am not not able to post a comment to a post (If I'm clear). – millebii Feb 03 '11 at 13:45
0

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>
Awais Qarni
  • 17,492
  • 24
  • 75
  • 137
  • see above. I don't want to publish on the user wall, I want to publish a comment on my own application wall. – millebii Feb 03 '11 at 13:52