Laravel Instagram API , pulling specific hashtag from specific user (eg: pulling #smile from @instaguy). Need help on how to do it

StackOverflow https://stackoverflow.com/questions/23125074

Question

has anyone done any project involving instagram api on Laravel? I need help on retrieving specific hashtag from specific user.

$user = Instagram::getCurrentUser();

$users = $user->getMedia();

foreach($users as $media)
{
    var_dump($media->images);
}

This displays every media on that users profile

I know I need to put something in that foreach loop but still cant figure out anything

I then tried putting this in the foreach loop

$tag = Instagram::getTag('poster');

$media = $tag->getMedia();

when I var_dump this, it displays all posts from all users with that hashtag.

Was it helpful?

Solution

I think this is not supported by Instagram itself.

You have to check for the hashtag yourself in the foreach Loop. I guess $media->getTags() should give you the list of tags of this user.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top