Skip to content

IG Hashtag Recent Media

Justin Stolpe edited this page May 21, 2022 · 4 revisions

Get the most recent media published for a given hashtag.

use Instagram\Hashtag\RecentMedia;

$config = array( // instantiation config params
    'user_id' => '<USER_ID>',
    'hashtag_id' => '<HASHTAG_ID>', // id of the hashtag
    'access_token' => '<ACCESS_TOKEN>',
);

// instantiate recent media for the hashtag
$recentMedia = new RecentMedia( $config );

// recent media for a hashtag
$recentMediaForHashtag = $recentMedia->getSelf();
Clone this wiki locally