Jump to content

Facebook Api: Delete comment based on user id


dumb2champ

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(
      $session,
      'DELETE',
      '/{comment-id}'
    );
    
    $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..

 

Thanks

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.

Archived

This topic is now archived and is closed to further replies.



×
×
  • 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.