Getting Instagram data from subscriptions - instagram

I have several Instagram subscriptions (geographies) made, several are in Manhattan and they are getting data. I also put one at my exact location with a 5km radius.
However when I make posts i am not receiving the Instagram data. I am also collecting tweet data and if I share the post on twitter I am only getting the tweet not the Instagram post. The tweet is coming up as 300 feet from where i made the subscription.
On my Instagram post i have allowed locations and chose my exact location
How can i make an Instagram post be retrieved by my geography subscription?
How can i get the details of a subscription after the subscription is created (a lookup)?

Related

Is it possible to retrieve metrics from an Instagram account?

I am trying to create a program that retrieves the total number of likes, comments, etc from an Instagram account, not necessarily the content of comments etc but just gives the total number of likes and comments from a specific account. Is that possible using the Instagram API?
So I've been stuck on this exact problem and here's the pertinent bit of my research for Instagram so far.
With "basic display" access one can get access to username, the total posts by the user, and the user id. That gives access to the actual posts, but not any anylitics to do with it, ie. no likes, shares, comments etc. Just a list of URL's.
You can use the "Business Discovery" endpoint (pulls profile info, follower counts, posts and associated like and comment counts) in two ways;
1. Authorize your own facebook page, create a long lived access token using curl or some other method and code it into your app and reuse the same token to pull all that data... But it's rate limited to something like 200 requests an hour.
2. Request permissions from the user, with a facebook access token. This is the most annoying bit. In order to get insights or any advanced data from the instagram graph api, the instagram user has to be a creator or business account, and MUST link a facebook page to the instagram account. And then use their info to request the data, thus no rate limits.
The benefit to point 1 above is that it doesn't really require an app review, since you are using your own testing account. But again, the rate limit and high probability of change is a negative.
You could also request instagram insights permissions, which would give you lots of information, but thats the same issue as point 2 above. Expanded permissions.
This permission would allow you to pull things like;
-A list of cities of the users followers
-A list of countries of users followers
-The gender and age distribution
-Post impressions (Total number of times the IG User's IG Media objects (i.e. posts, stories and promotions) have been viewed. Includes ad activity generated through the API, Facebook ads interfaces, and the Promote feature. Does not include profile views.)
-Active followers (Total number of the IG User's followers who were online during the specified range.)
-Profile Views (Total number of users who have viewed the IG User's profile within the specified period.
-Reach (Total number of times the IG User's media objects (i.e. posts, stories and promotions) have been uniquely viewed. Includes ad activity generated through the API, Facebook ads interfaces, and the Promote feature.)
relevant doc ->
https://developers.facebook.com/docs/instagram-api/reference/user/insights
But the unfortunate thing, is that there is also this relevant doc ->
https://developers.facebook.com/docs/instagram-api/overview#authentication
You can use business discovery in instagram graph api. This api can get account data from the other user by their username. (but it is still using your own facebook token)
sample req:
https://graph.facebook.com/v3.2/17841406390881400? fields=business_discovery.username(mattttgogogo){followers_count,media_count,media{media_url,timestamp,like_count,comments_count, permalink}}&access_token=
sample res:
{
"business_discovery": {
"followers_count": 113,
"media_count": 19,
"media": {
"data": [
{
"media_url": "https://scontent.cdninstagram.com/v/t51.2885-15/53548713_2066113247020455_3245400417240682448_n.jpg?_nc_cat=107&ccb=2&_nc_sid=8ae9d6&_nc_ohc=UIQzZq1WznMAX8utxLk&_nc_ht=scontent.cdninstagram.com&oh=b1fcd69119164fb4291b56aae212446a&oe=602439D5",
"timestamp": "2019-03-10T10:03:49+0000",
"like_count": 29,
"comments_count": 1,...
Not sure if they provide an api to get the sum, but at least you can calculate based on the response

Instagram graph api get amount of follows and followers

Trying to figure out a way to get the amount of follows and followers of a user via the Instagram-basic-display-api which is intended for consumer users.
I can only get the account_type, id, media_count, username
fields when doing a get on the user node
GET https://graph.instagram.com/{user-id}
?fields={fields}
&access_token={access-token}
Since the old Basic Instagram api https://www.instagram.com/developer/endpoints/users/#get_users_self supported the amount of follows and followers Im wondering if they are going to add this or if this is possible via another new Instagram endpoint?

retrieving instagram stories data using instagram api

I want to access and retrieve a user's Stories post from Instagram using their Dev API.
I tested after posting a story myself by using https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN.
However, that returns an empty object unless I post a regular post.
As far as I am aware the Instagram API does not currently return Stories.
The example response in the documentation for the media endpoint, for example, shows responses for Images, Videos and Carousel items only. The recent media end point documentation doesn't go into much detail on responses.
Media End Point Documentation
It is available only for Instagram Business Account.
See this link for more information: https://developers.facebook.com/docs/instagram-api/reference/user/stories/
The id returned by this endpoint can be used on the same API media endpoint.

Instagram API - Get newest posts same with user Instagram wall

Is there any API that allow me get the newest posts same with what is displayed in the user Instagram wall?
I looked the API document, and just found the endpoint for get feed of a specify user only. I want to get the list of photos/videos that is merged from multiple user feed who the current user has followed.
Thank you in advance.
The feed API existed before, but was stopped after June 1, 2016. Probably because they want all people to use Instagram app for viewing that feed, that way Instagram can sell Ads and make money.

How to Get Historical Data from Instagram API

I'm making an Instagram analytics web app. I've carefully read all of the Instagram API endpoints and I can't find any way to get historical data (ie, followers over time). All I would need would be something like a date followed, attached to each follower object.
However, there are Instagram analytics sites that offer this, for example, minter.io.
https://minter.io/faq#faq-posting-1
From link above: "Minter.io provides full historical data on Instagram accounts and hashtags except for:
Accounts – List of Lost Followers
Hashtags – Reach and Exposure
In these reports the data will only be available from the date the report is first generated."
An example of this historical data, from minter.io report on my account:
At this point, I think that either:
Minter has some special arrangement with Instagram to get additional data that otherwise isn't provided through API.
I'm missing something..
I understand how this could be done by comparing user data to previous reports (like this SO question asked) but clearly Minter is doing it some other way, because that report was generated from the very first time I created a trial account with them.
Any help would be much appreciated.
Now Facebook graph API has released the Instagram Insights API which returns detailed insights of Instagram Business accounts.
https://developers.facebook.com/docs/instagram-api/reference/user#insights
Above is for user insights, which has follower count. there are many media insights as well now available under graph API.
Details on how to consume this API is captured in the answer at: How to access Instagram feed of any user with new Graph API?

Resources