-
Notifications
You must be signed in to change notification settings - Fork 31
IG User Mentions
Justin Stolpe edited this page May 21, 2022
·
8 revisions
Allows you to comment on posts and comments the user is tagged in.
use Instagram\User\Mentions;
$config = array( // instantiation config params
'user_id' => '<IG_USER_ID>',
'access_token' => '<ACCESS_TOKEN>',
);
// instantiate mentions for use
$mentions = new Mentions( $config );
$mentionsParams = array( // reply to a post the user was mentioned in
'media_id' => '<MEDIA_ID>', // media id the user was mentioned in
'message' => '<COMMENT>', // comment text
);
// post the comment
$mentions->replyToMedia( $mentionsParams );
use Instagram\User\Mentions;
$config = array( // instantiation config params
'user_id' => '<IG_USER_ID>',
'access_token' => '<ACCESS_TOKEN>',
);
// instantiate mentions for use
$mentions = new Mentions( $config );
$mentionsParams = array( // reply to a comment the user was mentioned in
'comment_id' => '<COMMENT_ID>', // comment id the user was mentioned in
'message' => '<COMMENT>', // comment text
);
// post the comment
$mentions->replyToComment( $mentionsParams );