0

I'm trying to hide a comment in a post in my page, i've tried:

curl -X "POST" -k "https://graph.facebook.com/v2.4/[comment_id]/?access_token=[access_token]&is_hidden=true"

as stated in the documentation, i am getting this response:

{"error":{"message":"(#210) Updating is_hidden requires a Page access token","type":"OAuthException","code":210}}

also i tried sending the parameters using --data in curl but it didn't work too

Edit:

Note: the token is a page access token

Community
  • 1
  • 1
user2676847
  • 181
  • 1
  • 6

1 Answers1

1

The following should work:

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

Also, check your access token to comply to

Permissions

  • A user access token with publish_actions permission is required to edit a comment posted by that user.
  • A page access token with publish_pages permission is required to edit a comment posted by that Page.

See

Community
  • 1
  • 1
Tobi
  • 31,405
  • 8
  • 58
  • 90
  • For testing i've generated a page access token with full permission, same error: `{"error":{"message":"(#210) Updating is_hidden requires a Page access token","type":"OAuthException","code":210}}` – user2676847 Sep 16 '15 at 14:31
  • Have you checked it here? https://developers.facebook.com/tools/debug/accesstoken/ – Tobi Sep 16 '15 at 14:33
  • Yes, it tell me that it's valid and it have these scopes `user_birthday, user_reli...tory, user_work_history, user_website, user_managed_groups, user_events, user_photos, user_videos, user_friends, user_about_me, user_status, user_games_activity, user_tagged_places, user_posts, read_page_mailboxes, rsvp_event, email, ads_management, ads_read, read_insights, manage_pages, publish_pages, publish_actions, read_audience_network_insights, read_custom_friendlists, user_actions.video, user_actions.news, user_actions.books, user_actions.music, user_actions.fitness, public_profile` – user2676847 Sep 16 '15 at 14:40
  • Does the debug tool output list the specific page as well? If not, then it is _not_ a page access token … (which it doesn’t seem to be from what the error message says already.) – CBroe Sep 16 '15 at 19:58