How to get a third person instagram data using Instagram Graph Api - instagram

I am successful of fetching my own data using Instagram Graph Api but unable to find a way to get other person's data.
Official document clearly state that metadata of basic data for other Instagram businesses and creators are obtainable but not been able to find any code or document about it.
If anybody know how to do it I would love to know.
Even providing me a link to document or web page that have said information is hugely appriciated.
official document
https://developers.facebook.com/docs/instagram-api

This is described in the Business Discovery documentation. See also the API reference.
The tricky part is that you need to provide your account ID in the URL. (Basically, your account's node is used to access the business_discovery edge.)
You provide the target account's username in the field parameter, for example:
https://graph.facebook.com/v3.2/YOUR_ACCOUNT_ID?fields=business_discovery.username(bluebottle){followers_count,media_count}&access_token={access-token}
Where bluebottle is the username of the account you want data for.
Mind that this really works with business and creators accounts, so you won't obtain data for any random account this way.

Related

Using Instagram Graph API to pull information on creators/public account

I'm a little bit confused about how to use the Instagram Graph API. Do I need a business/creator account as well as register my app to be approved by Facebook to use the API itself? Any other requirements? My goal for the app is to be able to enter in someone's Instagram handle and able to get back some information such as name, id, profile picture, followers, as well as metrics such as engagement rate and average likes. Is that possible without needing to be approved to use it by Facebook? Is there an easy way to get that information?

How to get instagram id from update 29/6/2020

I am building instagram in wordpress using the "elementor" plugin.
In the old version I used the => https://api.instagram.com/v1/users/[my-id]/media/recent/?access_token=[my-token]
Path to retrieve my instagram info data
Through the "29/6/2020" version the old link was no longer available. The algorithm changed that I was unable to retrieve my instagram data that way.
You can show me a new link or a new way for me to get my instagram data (photos, links, likes, comments) on my instagram.
Thank you very much
Best regards
Now you need to connect your instagram account with your facebook account. After of that you can access such things in new way as described at https://developers.facebook.com/docs/instagram-api/reference/user/media#get-media here. Also you need instagram account as Business account.
If you wish to fetch media from your personal account for your website you don't need to work with the graph API and Facebook login part, simply use the INSTAGRAM BASIC DISPLAY API and get your details and media.
Refer this link:
https://developers.facebook.com/docs/instagram-basic-display-api

Connect Google calendar api and api.ai

So here is what i am trying to do :
I built a bot with api.ai for my business that is hosted on my webpage and my Facebook page right now. Bot works well.
I want to push it to the next step by allowing my customers to make querys on my calendar, ask to book a specific time, see if available, if not offer other time similar, then make a booking.
I have been reading this thread and the great answer attached to it but i think my case is a bit different.
I was wondering if the bot could always have a token so every guests won't have to Auth to query the calendar ?
Obviously i am new to this, i have been reading the guide of google calendar api and api.ai but i don't really see how to do that yet. I guess there is a way to store a token somewhere and then just trigger the query with some specific intents but not to sure how.
I have also done the node.js quickstart guide of the G-calendar api, and it works fine if that helps.
Thanks for your help !
You will probably want to use a Service Account that is permitted to the calendar in question. Service Accounts are similar to regular accounts, but they are expected to do server-to-server communication only, so the method to create an auth token is a little different to keep it secure.
See https://developers.google.com/identity/protocols/OAuth2ServiceAccount for more information about using Service Accounts.
In general, you'll be using a shared secret to create and sign a JSON Web Token (JWT) you send to Google's servers. You'll get back an access token which you'll then use to call the Calendar API. The access token expires in about an hour, at which point you'll need to repeat the process.
There are libraries available to do much of this for you. For example, if you're using the node.js library https://github.com/google/google-api-nodejs-client, then it will take care of this for you (although you need to modify the key file - see the documentation for details).

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?

Are Instagram Real-time Updates limited to images that are public?

We are trying to do a "proof of concept" to leverage Instagram to promote customer loyalty. So for example, you upload a picture at our store with our #companyhashtag and you receive some added reward to your account.
I've gotten a tag subscription to work, I tested it with the company user uploading a picture and tagging it. The company user is public.
Then I tested it with my personal account, and it does not trigger an update. I tried the following to see if it would get Instagram to use my subscription callback with now success:
Requested to follow my private account from company account, and granted the "Follow"
Tagged the picture uploaded from my private account not only with the subscribed #tag but tagged the company user in the photo
I have read the Authentication documentation in the API, but I think it would be too much for what we are trying to achieve.
First of all I would like to confirm if the real-time subscriptions are limited to "public" state users.
If beyond that anyone has insights that might add depth to the question or answer, much appreciated.
I would go as far as to say yes, this would only work for public images.
say for instance your account is private so you only want to make your pictures available to people you've allowed. You then don't want some random API application to get hold of your images and then be able to serve them online where ever they want.

Resources