-
Notifications
You must be signed in to change notification settings - Fork 30
IG Comment
Justin Stolpe edited this page May 21, 2022
·
4 revisions
Represents and IG comment on a media post.
Get data for the specified comment.
use Instagram\Comment\Comment;
$config = array( // instantiation config params
'user_id' => '<IG_USER_ID>',
'comment_id' => '<COMMENT_ID>', // id of comment to get data on
'access_token' => '<ACCESS_TOKEN>',
);
// instantiate comment for use
$comment = new Comment( $config );
// get comment data
$commentInfo = $comment->getSelf();
Show or hide the specified comment.
use Instagram\Comment\Comment;
$config = array( // instantiation config params
'user_id' => '<IG_USER_ID>',
'comment_id' => '<COMMENT_ID>', // id of comment to show or hide
'access_token' => '<ACCESS_TOKEN>',
);
// instantiate comment for use
$comment = new Comment( $config );
// set the hide to either true or false
$commentShowHide = $comment->setHide( '<BOOLEAN>' );
Delete the specified comment.
use Instagram\Comment\Comment;
$config = array( // instantiation config params
'user_id' => '<IG_USER_ID>',
'comment_id' => '<COMMENT_ID>', // id of comment to delete
'access_token' => '<ACCESS_TOKEN>',
);
// instantiate comment for use
$comment = new Comment( $config );
// delete the comment from IG
$commentDeleted = $comment->remove();