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

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

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 like button count on web page doesn´t correspond to Facebook insights number

I have an issue with the like button count on a webpage beeing much higher than the count reported in Facebook Insights for that same page on my domain.
For example when I look at an article that has been published for two days the button on site reports 18 likes. If i select the same timespan for that article in Facebook insights it reports 4 likes and 2 shares.
How can the numbers differ so much?
Thank´s for any advice!
I have the same problem, just Googled and found this post: http://faso.com/fineartviews/21028/facebook-like-button-count-inaccuracies. It explains very in details why and how.

Facebook Graph / Fql: Get all pics

I'm having return issues with graph API and I'm wondering if any knows why or how I can fix it.
I need to download all photo data for a given user (friend data, not the active user). Here are the two things I have tried.
FQL: "select pid from photo where subject=friend_uid"
Graph: "friend_uid/photos?fields=picture,created_time,tags.fields(name,id)&limit=1000"
I have friends_photos and user_photos permissions.
Any users with > 1000 tags will have drastically reduced result numbers.
For example, it will only return around 200 photos or so which is not acceptable, I need all of them
Chunking with since/until (or created_time < or > __) as well as limit clauses only improves the result count with FQL but the amount of chunking makes it VERY inefficient.
Any ideas? The tag data is also important for my purposes.
So, I need the proper query or sequence of queries to obtain ALL tag data for all photos of a given user_id using either FQL or graph-api.
I recently created a similar project (pulls all the photos from all your facebook friends in order) in PHP. Facebook's limits are poorly documented but I found that with the Graph API, it's 400 photos the friend is tagged in and 5000 photos the friend uploaded per request. Note that pulling from {user}/photos only pulled photos they are tagged in, while {user}/photos/uploaded only pulls photos that {user} uploaded. I figured that that 400 tagged and 5000 uploaded photos was enough for my situation.
If you do need additional photos, you will have to check the number of returned photos for the user for the /photos request and check if it's equal to 400. If so, you will have to go on to the next page, recursively.
For the /photos/uploaded request, Facebook uses cursor-based pagination (see bottom of this page), which means that pagination->next and pagination->prev data is only sent when there are more values to return. This makes it fairly easy to get the next page (once again you will have to do this recursively).

Show tagged images from facebook on website?

I am trying to achieve similar functionality to the one shown here...http://blackmilkclothing.com/collections/leggings/products/circuit-board-grey-leggings
there fan page https://www.facebook.com/blackmilkclothing allows people to hash tag a photo and then populate it on their website like the link above.
Loading a series of tagged images from my facebook fan page to my website. I am not positive how this is acheived? I am assuming some kind of api process but any help in the right direction would be appreciated.
Thanks! All help is appreciated
See the 'tagged' connection of a Page in the Graph API: https://developers.facebook.com/docs/reference/api/page/
It returns a list of objects the page is tagged in, including photos
If you need background knowledge I suggest these links in particular:
Graph API overview: https://developers.facebook.com/docs/reference/api/
Page login: https://developers.facebook.com/docs/authentication/pages/
After a good bit of trial and error I've found the most efficient way to query photos tagged to a particular Facebook page is to use Facebook's FQL interface to retrieve a list of stream posts.
With FQL you can limit the queried objects to only those posts containing images (unlike with the higher-level Graph API calls which will return all posts, many of which may not have associated photos), and you'll also have more granular control over composition of the result set.
Keep in mind that Facebook doesn't have true hashtag support (only Facebook pages can be tagged), so to simulate the hashtag support that Black Milk Clothing encourages, you'll need to parse and filter the photo message text yourself.
As an alternative quick and easy solution, I've rolled the results of my efforts into a free online service called TagTray -- with TagTray I've added an interface for building and curating hashtag based galleries from Facebook, Instagram, and TwitPic (including application-level Facebook hashtag filtering) that can be framelessly embedded into a site with a few lines of JavaScript.

Video or Photo statistics

Is there any way to pickup stats for video or photo facebook object (not youtube videos shared on facebook)?
Stats like:
views
shares
likes
I've tried here: https://graph.facebook.com/817129783203 but with no luck.
Any ideas?
Thanks in advance!
M.
As far as I know, you can't access the number of photo/video views. However, in your case, likes may be accessed by querying:
https://graph.facebook.com/817129783203/likes.
Facebook Query Language (FQL) doesn't support COUNT, so you need to get likes number by counting the number of returned results (realized by an external method).