Instagram API get information about a particular post

Asked

Viewed 2,876 times

0

Is it possible to access the media (of course public) without having the authorization of the user responsible for it? The idea is to know the number of likes and comments of a particular post via API.

One of the alternatives I found in some posts is to load the html of the example post: https://www.instagram.com/p/tsxp1hhQTG/ And manually fetch the number of likes and comments. This alternative would even solve my problem, but I’m deploying this solution in a system where several users would make this request, which is perhaps a bit "stressful" for the server and would risk distrust of Ddos.

I already created a "Client Application" on Instagram, I have Client ID, Client Secret and ACCESS TOKEN.

  • You want to get the media through what? Hashtag? Per user?

  • @Randrade by media-id or shortcode.

1 answer

3


Instagram is now in safe mode (Sandbox Mode).

This mode began to be deployed to all customers on June 1, 2016.

Before it, you were able to obtain public images through consultations with your access_token, now this is no longer possible.
To obtain this data using the access_token, your app must be submitted to Instagram to exit Sandbox mode and go to online mode.

But then, what is Sandbox Mode?

Each new app created on the Instagram platform starts in Sandbox mode. This is a fully functional environment that allows you to test publicly available API terminals before submitting your application for review. Safe mode is ideal for developers who are new to the Instagram platform and want to explore the API platform as well as for teams who need multiple customers for development, testing and other non-living environments.

To help you develop and test your app, users and the media available in Sandbox mode are real Instagram data (i.e., what is usually visible on the Instagram app), but with the following conditions:

  • Apps in the sandbox are restricted to 10 users
  • The data are restricted to users 10 and 20 the means more from each of these users
  • API reduced rate limits

What that interferes for me?

That’s simple my dear friend.

While your app is on Sandbox Mode, you will only be able to interact with whoever is set up with you. That is, will not have access to the photos and other information of the remaining users.

There’s another way to get the data?

You can download HTML, as the question says. But Instagram can block you with this. But the best way is to actually submit your application for approval.

Explanation in Soen.

  • So if Instagram approves my application, it means I can access the media (Ikes, comments, etc) without requiring user authorization?

  • @Leonardorocha You will be able to access public things. To have access to the user’s things, it still needs to be authenticated

  • Are all posts public? If a user is public, so I can get the number of followers, I still need his authentication?

  • @Leonardorocha Unfortunately yes. I hated this modification, but it brings more security to users, and with it, far fewer requests for the Instagram API.

  • 1

    But you having your App published, you have various information, as the documentation shows

Browser other questions tagged

You are not signed in. Login or sign up in order to post.