Get like_count & comments_count for specific media with Facebook Instagram API business_discovery - facebook-graph-api

I would like to update the like_count and comments_count for a specific instagram post with the new Facebook Instagram API. We have the post id and other data stored in our database and would only need the data of that specific post. At this point I am able to get the like and comment count via this API call:
https://graph.facebook.com/v2.12/xxxx?fields=business_discovery.username(jacqehoward){id,name,username,website,profile_picture_url,biography,followers_count,media_count,media.after(QVFIUlZA5aTR5NTE4Y24tNW90VGZAPTVBtb0NpOEFPTlNLeklmVTEtUDZAfVnE0YnBhUVNOQ3BDaktzNHJBTENhTmVYLUV2SGJPZAVAxZA09hQ2NhUGdnUGFjMTNn){id,caption,comments_count,like_count,media_type,media_url,owner,timestamp}}
After a while new posts are added to the account and you would need to go through all of the posts to find them again and to be able to get the like & comments count. In the old Instagram API you could get like and comment count per media. In the new Instagram API you are only able to get reach or "engagement" which is a combination of likes and comments while I want to have them separately.
https://developers.facebook.com/docs/instagram-api/insights
Anyone who has an idea how to add like count and comments count to the insight endpoint call?
Second question: If an instagram user with a private instagram account connects with your app how do you get the Facebook instagram ID so you can collect the posts on their timeline?

Related

Getting the private instagram users followers count via API

This isn't a new question. But the old topics ended in 2016 and I guess there must be a new solution to get the public meta data like profile pictures and follower data of a private instagram account.
The new api has the endpoint: https://developers.facebook.com/docs/instagram-basic-display-api/reference/user but this is only working with the correct userid - how to get this by username?
The old endpoints aren't working anymore and I am thinking about how to cerate a service like: https://www.instafollowers.co/instagram-follower-count with an APP-Token by the graph api or is there another solution to get anybodys instagram information (private and business and creators) account.
Hope for answers. :)
Consider to use thee business discovery API in Instagram Graph API.
Basically just create a facebook page and connect to an instagram business/creator account.
Then you are able to get the other users details by their ig username.
Visit https://developers.facebook.com/docs/instagram-api/reference/user/business_discovery for more details.

How to get the Profile name/Profile id of the Person who has liked the post in a fb page using facebook insights Graph API

I wanted to create a recommendation engine. I have a business page in facebook. I want to fetch the user names/user id and extra information of the persons who have liked the posts (like how google analytics gives for the website viewers). As far as i analysed, Facebook Graph API gives the count of the likes,comments etc.Could i get the user id's and timestamp of the person who have liked the posts along with the count

Is it possible to get the Instagram profile picture and other basic details?

I'm trying to get the details of the user using the access_token from the Instagram APIs, Instagram Basic Display API and Instagram Graph API. What I found is the details are bit messy and by going deep into it I'm not able to conclude the final result as I want.
What I got to know during the implementation is that Instagram has stopped the public APIs. does that mean apart from getting auth-token then had stopped everything?.
I have even tried the Instagram Basic Display API which is only giving the access of 4 fields account_type, id, media_count, username. Is it possible to get any other field from the same API?
If so How do I get the profile picture of the user and other basic details of the Instagram user?
any help will be appreciated
Currently, the API endpoint for retrieving a user's profile information only allows for the retrieval of the 4 fields you listed above. This is, up to now, all that has been made available for retrieval through the me endpoint of the Instagram Basic Display API for getting a User node.
Until the API developers further extend the API's endpoints and capabilities, you won't be able to use this API programmatically to get a user's profile image.

Subscribe to facebook graph api webhook for website likes count change

I have a website with some posts that have facebook like buttons. I would like to be able to sort those posts based on fb like count.
I can get number of likes for any post querying https://graph.facebook.com/?ids=ABSOLUTE_URL_TO_POST but I would like to be able to subscribe to Graph Api, so endpoint of my server can get notified whenever someones likes any of those posts.
That way I could store number of likes in my DB and then be able to sort posts based on that.
However, I am not able to find any suitable event in FB Graph API that I could subscribe to.
Any ideas? Thanks!
As correctly pointed out by luschn, there is no webhook api for getting likes count. Also if you will try get this likes count by polling graph.facebook.com you will quickly hit limit of allowed requests by facebook.
There is no way how to do this at the moment.

how can i get the details of a photo posted to facebook from instagram

I was trying to access the details(likes and comments) of the photos which are posted to facebook from instagram app.
I coulnd't find any way to get that.
how can i confirm that a photo is posted from instagram?
Did you try the facebook endpoint /me/instapp:take ?
I can at least get my photos... don't know about public pictures...
Now I am able to get my instagram photos and others as well but the thing is we can't access anybody's instagram photo details for that we need to have access token of that user.