How to get instagram user data (ex follow count) through facebook.com api with http request - facebook

I want to get instagram user data for example follow and follows count using http request to https://graph.facebook.com/v14.0/{inst_acc_id} but i cant understand which token from graph api explorer i should use. There is lots of types and lots of permissions there. i tried different ones and all of them doesn't work for me. Or maybe there is another easier way to get instagram user data after the 2020 api change.
I need a solution for my NodeJs project, but it would be great to make it work even in plain http in postman. Any advices are highly apreciated)

So after the 2020 update you don't have an easy way to get even public data from meta ( facebook and insta). To get access for their api you need to provide a lot of personal data about your business, your website and a lot of other documents for them to review your request. And if you are trying to have a simple website that shows for example your instagram followers count its a giant overkill. And no other way around.

Related

Get a notification when a facebook page post is made

I follow a facebook page which has some interesting posts and they post regularly. I want to write a python script that gives me a notification whenever the page posts something. Is there a way I can accomplish this in Python?
I have searched a bit, seems like graph API is the way to go. However, all the tutorials I have seen online give a way to scrape some data or get post information. I do not seem to figure out a way to detect when a new post is made.
How should I accomplish this task?
Notifications for changes or new posts can only be made with Webhooks - which are only available if you manage the Page. Scraping is not allowed on Facebook, so there is no way to get notifications for Pages you do not manage.
You could only check with the API on a regular basis, but you would need Public Page Content Access for that, and you may have a problem with API limits if there are many Page Posts or Pages you want to check.

Facebook Graph API insights

I'm new on working with Facebook and honestly I found it very confusing, terminology and documentation seems to be very ambiguous in many cases. Can somebody please help me out with a plain english explanation on how I can achive the following?
Post and image to Facebook (on the user page) and then check the stats (insights) of that post.
Till now I have managed to:
1) Create an app
2) Post the image on the user page with the desired message
I'm not able to understand how I can retrieve information about the particular image which was uploaded through my app. I want to know how many people have viewed that image, how many likes did it get, how many times it was re-shared.
Is it possible at all?
I'm posting to /photo not too /feed and I will like to keep it this way if it is possible.
Sorry if this was answered already but I spent a few hours trying to find an appropriate answer but wasn't able to get the right documentation.
UPDATE 1
After having a couple of days off from this topic and receiving the first 2 answers, I took another dive into this. Now I have tried the Graph API Explorer as suggested, and using the ID of a POST I can get some details about the POST, but the insights aren't showing anything, just next and previous.
My goal is to be able to gatther some stats about the pictures uploaded through the app. If this is not possible directly what should be the approach I need to take?
I don't believe a personal /photo has /insights attached to it - the Insights Object documentation page suggests that they do not - but you should be able to get likes, shares, and comments via the API.
It would appear FB has launched a redesign/reorganization of its documentation in the last couple of weeks, but the documentation for the /photo graph object is here -- you will need the user's Access Token, and the API endpoints you're looking for each have links to their own documentation pages there, including example code for each type of request.
Edit (summarizing discussion in comments):
There is no method via the Facebook API to gather insights for all photos posted to individual user timelines via an app. The app can gather likes, shares, and comments for each of those objects individually via API requests, and can make API requests for insights for photos posted to its own timeline. Neither of those options solves the intended use case here.
I'd recommend a solution that uses Sharing rather than an app integration, as this allows for better access to insights on the photos being shared. This is also a much simpler integration, and less brittle wrt future Platform changes. The main tradeoff is that the original photos being shared are expected to expire after a couple of months -- if this is unavoidable, I'd suggest implementing a redirect for requests for expired objects on the site.
We are able to get different kind of photos or picture Using Graph API
like as below:
1.Page Photos
Photos for a Facebook Page.A Page Access Token is required for all methods.Find here
2.Page Picture
Picture belonging to a Facebook Page. Find here
3.Photo
Represents an individual photo on Facebook. Find here
4.User Photos
Photos for a person.Find here
I hope it's helps you.

How to get Facebook share count for all links shared using a given application via Facebook API

Is it possible to get a list of statistics/analytics for all the links shared using a server-side Facebook application via the Facebook API?
I have a list of links that can be shared to Facebook using the appId defined in my server app. In order to refresh the share count of those items, I'm currently calling:
http://graph.facebook.com/{MY_URL}
whenever I want to update those values.
Obviously, this solution is not very scalable, because the number of items constantly grows so I can't call the method on all the URLs in sequence. Alternatively, this information can be fetched every time it needs to be visualized to the users. However, this can mean that the same request will be made to Facebook API in quick succession even though the chances of anything changing are small.
Ideally, I would like to get a list of all the links/items shared using my application with the share count for each of them. This way I can do a nightly update of all the values without going one by one.
I'm using the
me/links
API method to share the links to Facebook.
Analytics of a post, shared by a page can be accessed by the Insights API
Below id the Graph API call to access the count of clicks sent to your domain by a certain post.
/v2.4/<object-id>/insights/domain_feed_clicks?period=lifetime
If this is not what you're looking for, please refer to the permalink mentioned above and find the metric which best suits your need.
I would like to get a list of all the links/items shared using my application
The API does not provide that kind of list.
To reduce the number of API requests you have to make, you can request the data for several URLs in one go though: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.4#multirequests
https://graph.facebook.com/?ids=http://example.com/foo,http://example.com/bar,…
(You should properly URL-encode any URLs you use a parameter values here of course.)

Can google analytic API provide all info of all pages of a website?

I am new to Google Analytics. I would like to get all information (Unique and Total Visitors, Redirecting URL etc) of a Profile, which has url like www.someurl.com/profile/unique_profile_id
So I can easily have unique url for each profile, but as I am new to this. I don't know where to start.
API docs is good but confused where to start. If some can suggest small source of getting started with what i mentioned it will be very helpful.
Thanks in advance.
I come up with this query, but still I am not understanding ga:ids. This ga:id is for my home page www.mydomain.com
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A90283827&start-date=30daysAgo&end-date=yesterday&metrics=ga%3Apageviews%2Cga%3AuniquePageviews
Let's suppose my site have 1000 user and their profile has url as I mentioned above. So what will be ids for that each profile to query.
I think you are miss understanding how the Google Analytics API works. The api returns raw data back from Google Analytics in the form of Json. It will be up to you to format that data.
What I want is that how can I access data of each page that is
currently available in my site.
I sugest you look at ga:pagepath by adding this dimension you will be able to request data by the page. for example pagepath, sessions will give you the number of sessions by the page path. You may want to try testing using the query explorer so that you can get back only the data you need.

Having issue sharing my Websites post to Facebook's timeline

We want users to be able to post to their Facebook if they want to. We have it kind of working with the older Facebook profile but not with the new Timeline.
We want it to be like Tumblr where you can post/share to your Facebook account as much as you want.
Is there a limit of post that we can have a day per users or the via entire API in general?
We are using FB connect already of course!
The documentation for Facebook's Open Graph is probably the best place to start. Take a look at their best practices page, as well:
If your application is making too many calls, the API server might rate limit you automatically, returning an "API_EC_TOO_MANY_CALLS" error.