How to get user data now with restrictions on instagram platform api? - facebook

There have been lots of changes to the facebook api recently, which now includes the instagram api as well. https://www.instagram.com/developer/changelog/
They have shutdown a lot of endpoints way ahead of schedule and has created a huge problem for my application which integrates instagram user data. They have the instagram graph api now, but looks like it can be used only for business accounts (looked like that prima facie). Reading through the news past couple of days, I am really confused about what is available and what is not. My application used to get user data (number of followers, recent posts, reach, likes, etc) using the instagram handle provided by users. Since this is totally restricted on the platform api now, is there a way I can have the same functionality using the new graph api? Or should I look into 3rd party APIs? I am open to asking users for authentication (I already have the facility). Can the user information be fetched after they authenticate my app to do so?

You can use the following Graph API to get all the details for any IG business account.
https://developers.facebook.com/docs/instagram-api/business-discovery

Related

Connect App Flutter with API instagrame Publish comment

I have a question about connecting my app, made with Flutter, with the Instagram API.
I want the user to register with their account, store the access token and then send a post to the API to publish a comment or add a like.
Can I do this with Flutter or do I need to use a different language like Python?
I checked the API documentation that Instagram provides and it seems that you can only do read-only requests (liking a post might not be possible).
The API you mentioned in your tags will not work with personal accounts, as Instagram states:
The API cannot access Instagram consumer accounts (i.e., non-Business or non-Creator Instagram accounts). If you are building an app for consumer users, use the Instagram Basic Display API instead.
You can try to use the mentioned Basic Display API instead, but mind you won't be able to author any posts or do actions in behalf of the user. To circumvent this, you might have to reverse-engineer the frontend facing portion of Instagram but I won't go into that.
To come back to your question, Flutter is well able to send network requests as mentioned here, but you still have a long way until you have functioning access to Instagram (check the Getting Started).

Which Instagram API should I use to collect public data?

Does either the Instagram Basic Display API or the Instagram Graph API allow me to simply get any public user's posts/media programatically? Everywhere in the documentation it says "User data" but it feels like I can only get data of the user that got authenticated using the API. I've set up a Facebook dev account and currently spending 4th hour on calling both APIs without success. Can anyone who has used them help me clear this up?
Most likely, Instagram API Date 365, a tool I currently work for, may help you as an alternative to using Instagram Basic Display API or the Instagram Graph API because this API is created especially for scraping bulk data about posts and users.
You can get such post data as post content (text, language, list of hashtags, list of tagged users), owner ID, location ID,
engagement info, etc. Also, it is possible to download comments (selected or on a specific post) and replies to them.
You can view this for more info.

Instagram API deprecation 2020

I'm building an app that has the user log in through instagram, it then reads their feed and uses that information for the app. Instagram has a page that says their API's will be deprecated in 2020 but some things will still work. It's not straightforward as to what is being deprecated and what isn't, and I have not found any way to contact them directly. Does anyone know if the following URL will continue working, and if not if this type of app will even be viable in the future? Why is IG and Facebook becoming much more closed platforms to 3rd party integrations?
https://api.instagram.com/v1/users/self/media/recent/
Deprecation notice:
https://www.instagram.com/developer/
The legacy Instagram API - https://www.instagram.com/developer/ will be deprecated in favor of Instagram Graph API provided by Facebook - https://developers.facebook.com/docs/instagram-api
In order to use https://api.instagram.com/v1/users/self/media/recent/ this endpoint you need Basic permission. As documentation says, it will be deprecated in early 2020, which means that the legacy API will be most probably shut down, since there will be no more capabilities to request for.
You should most definitely start building your app with Graph API. Please keep in mind that it takes some time before you can go live with your app. It requires couple of things like Business Verification, review of requested permissions in App review and it can take some time to be able to go live.
Please keep in mind that the Graph API works only for Instagram Business type of accounts. You can't use it for regular accounts at the moment. It is not clear yet if it will be available for all accounts, but most probably it will be in the future. It was the same as with deprecating Public Content permission on Instagram legacy API. They added similar functionality in Graph API.
If you plan to support all users, you will also have to apply for Basic capability in legacy API. In other words, you need to support both Instagram API and Instagram Graph API if you plan to target all Instagram users, both regulars and Business profiles.
Another thing to keep in mind is that you can't really report bugs or get any help from legacy Instagram API. If you will find the bug you can't report it as they do not accept it due to deprecation.
So start building with Instagram Graph API, once you will be good to go, try to add Instagram legacy API support. If everything will be fine and Facebook will add support for legacy accounts, your Graph API should easily take over Instagram legacy API functionality.
Most probably the reason why they are tightening the integrations and makes it harder for the developers is user privacy. They do not want to have yet another incident like Cambridge Analytica for instance.
It does not make sense to build something with the old API, that old API URL will definitely stop working (with all the old api.instagram.com endpoints). There is a new API though: https://developers.facebook.com/products/instagram/

How to simulate silent login to Facebook Graph API?

I'm working on an API that will aggregate data from several website, including facebook. The API has an engine that harvests data on regular intervals, and then the client app polls the API to get the data from all websites centrally.
The problem is that the API has no way of authenticating on the regular, behind-the-scenes harvests, as Facebook insists that the user has to click on the OAuth Dialog. With the short story being that there is no way to login to graph API silently this almost means that developing such an API is not possible (except for harvesting only public data).
However, I'm not easily satisfied by "it's not possible" answers and my clients - even less so. Accessing private information on demmand is defnitely possible as Facebook apps do that. For example, the official Twitter app posts on my wall whenever I tweet. I guess apps only need a permission once and then can access the user's profile as much as they like.
So this leads me to think that I should do a combination of a Graph API client and an application that talk to each other, and whenever the API needs to harvest - it asks the app to get the data and fetch it to the API. Or maybe it should be a push model (the app sends the data whenever it's generated) rather than pull (the API requests the data at regular intervals).
Am I on the right track? Is any of these the correct design approach?
I did some searching but it's very hard to find any useful discussion on the topic as whatever keywords I try I only find "Can I login silently? No" type of discussions.
You'll want to look into the offline_access permission. This lets you access a user's data when they don't have an active session, or are offline. That's as close to "silent login" as you can get.

Must a Personal Profile be Used to Access the Facebook Graph API?

I'm trying to access Facebook data using the Graph API from an external commercial application. I've created a login for my company and gather that I need to register a Facebook App in order to use the Graph API.
However, I am confused about the Facebook requirement to associate a Personal Profile (a real person) with the Facebook App. Why must a person become connected to my organization's application?
What if I leave the organization? Will the company I worked for need to pick another employee in order to access the Graph API?
Surely I am missing something.
Your question here seems to be about the Facebook API in general and registering an app for it, rather than the Graph API per se. The answer to the general question is that, as with the Twitter API and certain Google APIs, the personal account is used as part of the process of validating that the app is tied to a real person. Luckily, there's a good solution in place for handling when app developers no longer work for a company: another app developer can remove them from the app. You can list someone else on your team as a developer of the app and they will have the same rights to edit it as you do.