LIKE AND COMMENT A POST ON A PAGE WITH OPEN GRAPH API

Jayden Bell

Total Post:110

Points:774
Posted by  Jayden Bell
 1639  View(s)
Ratings:
Rate this:
Hi Everyone!

To evaluate the title of the question, I have created a page. And also app for getting a appID.

I have posted a like(action) on a tech crunch article(Object) on my timeline with the mention of my FB app name. But, is it possible to let users of my website like & 

comment a particular post , which the admin posted to public on my Page using graph API.

how can we get access tokens for users to do so ?

would we still need app ID. even if it is about the Facebook page. ?

Thanks in advance! 
  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: Like and comment a Post on a Page with Open Graph API

    Hi Jayden!


    Yes you can create Like and Comment over a particular Post and to do so you would be required to have a Facebook app and get User's authorization for publish_stream permission. After that you can create Like for a particular Post by making a HTTP POST request to POST_ID/comments with message field and would return comment_id as success and like by making HTTP POST to POST_ID/likes which would return true as success on creation of like.

    I hope above solution is useful for you. 

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!