Skip to content

IG User Media Publish

Justin Stolpe edited this page Nov 15, 2022 · 5 revisions

Publish an IG container to Instagram.

YouTube Tutorial - Publish Image

YouTube Tutorial - Publish Video

use Instagram\User\MediaPublish;

$config = array( // instantiation config params
    'user_id' => '<USER_ID>',
    'access_token' => '<ACCESS_TOKEN>',
);

// instantiate media publish
$mediaPublish = new MediaPublish( $config );

// post our container with its contents to instagram
$publishedPost = $mediaPublish->create( '<CONTAINER_ID>' );
Clone this wiki locally