skip to Main Content

I am trying to write an Instagram app which among others will let me get media based on a hashtag.
I already finished it, and only then noticed this message from Instagram in the developer page.

Starting 10/1/2017, all permissions other than the basic permission will be unavailable to submit for or obtain.

Query by hashtag needs the public_content permission.
Looks like this is not possible anymore.

Are there any other options? I tried to look for similar functionality with Facebook graph api but didn’t find anything interesting.

3

Answers


  1. Id love to know about this as well, we have been developing and didnt know about the cut off to these permissions. Looking for a solution to retrieve public images based on a hashtag.

    Following!

    Login or Signup to reply.
  2. Try this PHP library:
    https://github.com/postaddictme/instagram-php-scraper

    or Java library:
    https://github.com/postaddictme/instagram-java-scraper

    Example:

    https://github.com/postaddictme/instagram-php-scraper/blob/master/examples/getMediasByTag.php

    require __DIR__ . '/../vendor/autoload.php';
    
    $instagram = InstagramScraperInstagram::withCredentials('username', 'password', '/path/to/cache/folder');
    $instagram->login();
    
    $medias = $instagram->getMediasByTag('youneverknow', 20);
    $media = $medias[0];
    echo "Media info:n";
    echo "Id: {$media->getId()}n";
    echo "Shotrcode: {$media->getShortCode()}n";
    echo "Created at: {$media->getCreatedTime()}n";
    echo "Caption: {$media->getCaption()}n";
    echo "Number of comments: {$media->getCommentsCount()}";
    echo "Number of likes: {$media->getLikesCount()}";
    echo "Get link: {$media->getLink()}";
    echo "High resolution image: {$media->getImageHighResolutionUrl()}";
    echo "Media type (video or image): {$media->getType()}";
    $account = $media->getOwner();
    echo "Account info:n";
    echo "Id: {$account->getId()}n";
    echo "Username: {$account->getUsername()}n";
    echo "Full name: {$account->getFullName()}n";
    echo "Profile pic url: {$account->getProfilePicUrl()}n";
    
    Login or Signup to reply.
  3. According to the blog post on facebook, they will be deprecating public content apis on December 11, 2018.

    https://developers.facebook.com/blog/post/2018/01/30/instagram-graph-api-updates/

    I also didn’t find anything on the graph api for this use case so it looks like you will be out of luck.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search