Like a Facebook Wall Post - Javascript

后端 未结 1 1829
名媛妹妹
名媛妹妹 2020-12-17 07:09

I\'m developing a Facebook application that retrieves specific facebook wall posts. I simply want to allow the user to \"like\" the post from within my application using the

相关标签:
1条回答
  • 2020-12-17 07:38

    UPDATE:
    Issuing a POST request to the likes connection of the post object is all you need:

    You can like a Post by issuing a HTTP POST request to the POST_ID/likes connection with the publish_stream permission. No parameters necessary.

    Example:

    FB.api("/POST_ID/likes", 'post',function(response) {
        if(response === true) {
            alert("done!");
        }
    });
    

    The above request should return true on success.

    0 讨论(0)
提交回复
热议问题