How to post a comment using Facebook API

17.6k views Asked by At

I'm trying to post a comment to my facebook using facebook API. I'm trying to send this request:

https://graph.facebook.com/{post id}/comments/?access_token={token}&message=hello

This return to me list of comments but doesn't post the message I sent. What should I do to post my message?

Thanks.

2

There are 2 answers

0
bangdel On

You should make a POST request and make sure you have all the permissions required to publish. Docs here.

1
sadaiMudiNaadhar On

Update

As of April 24,2018, the publish_actions permission has been removed. Please see the Breaking Changes Changelog for more details. To provide a way for your app users to share content to Facebook, we encourage you to use our Sharing products instead.