Jump to content
Sign in to follow this  

Facebook Api: Delete comment based on user id

Recommended Posts

Hello everyone..


I have a question to delete comment based from user-id itself.


I use PHP SDK to delete any comment to my facebook page and it was success as long as I specify the comment-id..


Below are my codes to delete a comment from comment-id

    $request = new FacebookRequest(
    $response = $request->execute();
    $graphObject = $response->getGraphObject();

Is it possible to delete comment based on user-id itself?


I know that I just need to query the graph api to get the comment-id from A but each comment have different id`s so its hard to query the comment-id everytime..


For example: A, B, and C comment to my facebook post and I want to delete the comment where the user-id is from A?


So, if the api scan and found out that A is commenting to my post, it will be deleted instead deleting B and C


I really appreciate for any help from you guys..



Share this post

Link to post
Share on other sites

I would expect that, as any given user ID can be associated with multiple comments, the answer would likely be no.  This should probably be in the Other Libraries and Frameworks section as it would be better answered by someone with knowledge of that specific API rather than PHP in general.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.