Calculate total number of likes on specific date in facebook - facebook

I am using Graph API for getting insights of the page. For that i am using link like
https://graph.facebook.com/v2.0/PageID/insights/page_fans/lifetime?access_token=MY_ACCESS_TOKEN&since=2014-07-01&until=2014-07-15
I am getting total no. of like until date.
I want to show the total no. of users liked page in specific date like 2014-07-01,2014-07-02,2014-07-03....
Thanks for help..

You can use the page_fan_adds metric:
GET /{page_id}/insights/page_fan_adds?since=2014-07-01&until=2014-07-15
Have a look at https://developers.facebook.com/docs/graph-api/reference/v2.0/insights#page_users

Related

How to calculate Total Follower on Facebook when called through REST api?

I am looking for an alternative way to calculate facebook page followers. As per facebook api documentation, there is no such metrics available as of now.
Let me know if anyone has encountered any solutions to it
Thanks
Harsh
If you want the total number of people who like the page, there is the field fan_count, that you can get with this query :
GET https://graph.facebook.com/{PAGE_ID}?fields=fan_count
If you want the total number of people who follow the page, there is no field to do this, according to the doc : https://developers.facebook.com/docs/graph-api/reference/page/

Facebook API Metric - how to get: total photo views, comments, share and link click

i am trying to get some data via Facebook API. Currently i can get:
organic impression (Metric: page_impressions_organic)
organic paid impression (Metric: page_impressions_paid)
total likes (Metric: page_fans)
total video views (Metric: page_video_views)
What i also need is:
total photo views
total shares
total link clicks
total comments
but i do not know how to get it.
Is it possible to get this data via Metric or a different way through the Facebook API? Could you tell me the methods to achieve please?
Thanks

How to get page fan count from last week

I want to get the number of new facebook fans for a given page from last week.
e.g.: monday to sunday of previous week.
I have searched for this but can't find any info.
I can get the total fan count easily from the social graph but not sure how to get new fan count from last week so that I can get a report like:
New fans last week: 152
Total fans: 2341
You have to be admin of that page, and you need the "read_insights" permission. Without user authorization you don´t have access to the Insights, and that´s the only way to get detailed statistics.
https://developers.facebook.com/docs/reference/fql/insights/
Using FQL, it is explained here:
How to get `page_fan_adds` for multiple days using FQL
A bit complicated, because you have to add the daily values. But on the same page, the much easier solution is presented:
bladauhu/insights/page_fan_adds/?since=1340175600&until=1342767600

Facebook count likes generated for an external site

We have references to other companies on our website and provide the option for people to 'like' them. After a quick skim of the Facebook documentation, I can't work out how to calculate the number of likes our website generates for others so we can measure our effectiveness. Is this possible?
Thanks
The easiest way to get this from the graph api for example https://graph.facebook.com/http://www.google.com there you can find the total number of likes and comments
You can subscribe to "edge.create" and count user likes of any like button on your site.
http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
There is another source (website or something) that have a like button with the same url? if not, you can query link_stat table using FQL to know the number of likes of a url. if yes, I think that the only option is to store the likes count in your website code, in a database or something.

How to display Monthly Active users (MAU)?

Hey there,
I want to fetch / display the MAU of a specific Facebook App. Is this possible or can this be done with a plugin?
You can do this with either the FQL or Graph API. To do it with the graph you will want to make the following call:
https://graph.facebook.com/your_app_id/insights
This will return you a json object. You will want to look for the insight called "application_active_users" for the period month.
You can find more about insights here and here.