Facebook Dev Delete Comment

Permisi juragan2, mau nanya nih, gimana ya caranya biar bisa hapus comment yg muncul di halaman kita, sedangkan fitur comment itu kita pake plugin facebook.

avatar ashandysp
@ashandysp

49 Kontribusi 18 Poin

Diperbarui 2 bulan yang lalu

4 Jawaban:

bisa dicek di graph API facebook langsung https://developers.facebook.com/docs/graph-api/reference/v2.8/comment di bagian delete ada

 /* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'DELETE',
  '/{comment-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
avatar hilmanski
@hilmanski

2569 Kontribusi 2103 Poin

Dipost 6 tahun yang lalu

nah itu yg masih ane bingungin bang @hilmanrdn, di bagian {comment-id} itu get nya darimana ya? terus manggil php nya itu waktu user klik tombol gitu kan ya?

avatar ashandysp
@ashandysp

49 Kontribusi 18 Poin

Dipost 6 tahun yang lalu

bisa dicek di graph API facebook langsung https://developers.facebook.com/docs/graph-api/reference/v2.8/comment fnf
di bagian delete ada
Saya mencoba cara Anda tetapi masih tidak berhasil
avatar adersonmathew
@adersonmathew

2 Kontribusi 0 Poin

Dipost 7 bulan yang lalu

To delete comments from a Facebook plugin using PHP, JavaScript API, or any other programming language, you will need to use the Facebook Graph API.
// Set the access token and comment ID
$accessToken = 'YOUR_ACCESS_TOKEN';
$commentId = 'COMMENT_ID';

// Make a DELETE request to the comment endpoint $response = file_get_contents("https://graph.facebook.com/v12.0/{$commentId}?access_token={$accessToken}", false, stream_context_create([ 'http' => [ 'method' => 'DELETE io games' ] ]));

// Check the response status if ($response === false) { echo 'Error deleting comment'; } else {

avatar adamtony
@adamtony

1 Kontribusi 0 Poin

Dipost 2 bulan yang lalu

Login untuk ikut Jawaban