How to get ALL Instagram REPORTS using hashtag with API (not just my account posts)

How to get ALL Instagram POST by hashtag with API (not just my account posts)

I am trying to get all instagram drawings with the exact hashtag tag but I only get my own developer posts tagged with the hashtag.

I am currently working in a local development environment, maybe the problem?

Also, what is Sandbox Mode, and what should I do to get into Real Mode?

In the platform policy, it says “ You cannot use the Platform API to crawl or store media users without their express consent.

Does this mean that what I am trying to do is simply not possible?

thanks for the help

+3


source to share


3 answers


When you register for an API client, you will be working in sandbox mode (development / test mode), in this mode you will only get your and your data sandboxed in the API response.

After you finish the application, you have to submit it for review to check if it is approved, then you can set the application to Live mode and then you will see all messages in the API response.



PS Please note that you have public_content

oauth scope permission to receive all messages

+2


source


You can get messages in raw JSON simply by accessing this url: https://www.instagram.com/explore/tags/summer/?__a=1

Then just use javascript / jquery to get the data in a loop through the posts. You get 12 posts and a variable to see if there are more pages.

An example of receiving the last 6 messages:



$.get('https://www.instagram.com/explore/tags/summer/?__a=1', function (data, status) {
    for(var i = 0; i < 6; i++) {
        var $this = data.graphql.hashtag.edge_hashtag_to_media.edges[i].node;
        $('#container').append('<img src="'+  $this.thumbnail_resources[2].src +'">');
    }
});

      

Here is the code to play with

+1


source


You should be able to retrieve all public images with a specific hashtag, but not all of them. Then the private option in the user profile is meaningless.

About Sanbox / Real mode, you can find it in the API docs. But usually you use Sandbox to play around in a test environment to see how things work and behave as they did in reality.

-2


source







All Articles