IG Media - jstolpe/instagram-graph-api-php-sdk GitHub Wiki
Represents an Instagram media post.
Get data on a specific users media post.
use Instagram\Media\Media;
$config = array( // instantiation config params
'user_id' => '<IG_USER_ID>,
'media_id' => '<MEDIA_ID>', // id of post to get data on
'access_token' => '<ACCESS_TOKEN>',
);
// instaniate media
$media = new Media( $config );
// get info on media post
$mediaInfo = $media->getSelf();
Enable or disable comments on a users media post.
use Instagram\Media\Media;
$config = array( // instantiation config params
'user_id' => '<IG_USER_ID>,
'media_id' => '<MEDIA_ID>', // id of post to enable or disable comments
'access_token' => '<ACCESS_TOKEN>',
);
// instaniate media
$media = new Media( $config );
// set comments enabled to true or false
$media->setCommentsEnabled( '<BOOLEAN>' );