Hiding a comment programatically using Facebook SDK for Python

197 views
Skip to first unread message

lightofh...@gmail.com

unread,
Dec 1, 2017, 5:45:03 PM12/1/17
to PythonForFacebook
I am trying to hide comments based on search criteria (spam or offensive for instance) .

I am not sure if the following graph update is valid anymore but am sure how to form this call using the Facebook SDK for Python

Developers may now hide and unhide comments on a Page Post via the Graph APIPOST /v2.2/{comment_id}?is_hidden=true to hide, POST /v2.2/{comment_id}?is_hidden=false to unhide. You can determine if a comment is hidden, or if you have the ability to hide/unhide the comment by checking the is_hidden or can_hide fields on thecomment node.

I have also seen the following curl command but am not sure how to form that.

curl -XPOST \
     -k \
     -F 'is_hidden=true' \
     -F 'access_token=[access_token]' \
     https://graph.facebook.com/v2.4/[comment_id]

Any help is appreciated,

Tim
Reply all
Reply to author
Forward
0 new messages