how to get facebook shares, comments, like count for youtube videos? - facebook

I know how to query the social engagement counts for a regular website. It can be pretty easily achieved with the facebook graph explorer (https://developers.facebook.com/tools/explorer/) or throug api's. As path I supply the url of an object, e.g. an website e.g. https://developers.facebook.com/tools/explorer/?method=GET&path=http%3A%2F%2Fwww.manuelfink.de&version=v2.0
However if I try the same for a youtube movie https://developers.facebook.com/tools/explorer/?method=GET&path=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBpxVIwCbBK0&version=v2.0 it allways returns me the shared count of https://www.youtube.com/watch.
Is it possible to get the facebook shared/likes count for an youtube movie?
Thx, I really appreciate your help!

For share and like count, I think you can find an answer in the following questions on SO:
Get top videos on facebook/twitter, which is based on
How do you get the total likes for a URL (Likes and Shares)?, and
How to get share counts using graph API. Remember that a Youtube video has more than a possible url, so you may have to make several queries with different urls for the same video. I am not sure you can get the comments, but you can try with how can I get all comments from a url in facebook?

Related

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.

Way to get facebook API Sharer Counts

I was about to get the facebook video shares. I have tried the below URLs for getting the share counts, it seems to be giving the URL share counts instead of the actual video sharer counts.
https://developers.facebook.com/docs/reference/fql/link_stat/
(and) using Graph API
For example:
The below video has video share counts as 384 as of Mar29 2012
https://www.facebook.com/video/video.php?v=23155051776
But the above methods are giving the share counts as either 1 or 5. Please let me know the way to get the video sharer counts using API methods.
Thanks in advance.
This is currently not possible, you should add your voice to the feature request bug here:
https://developers.facebook.com/bugs/289679207771682

Facebook API restserver error with likes and comments

I'm having this strange problem: I have a link for a picture and i want to display it on my wall. Now i want to know how many times it was liked, shared and commented on. Let's say my picture url is http://mywebsite.com/mypicture.jpg?468
Now, I share this picture on my wall, I get likes, shares and comments.
If i'm using the http://api.facebook.com/restserver.php?method=links.getStats&urls=... i can see the shares, but not the likes or comments number.
Why is that? Do you think it's because of the ?468 after the .jpg? If so, why is that happing and only the shares are counted, and not the likes or comments?
For starters, you should be using the Graph API. The restserver.php file you are pointing at is deprecated at this point.
You will want to use the send (or like) plugin from Facebook. The REST API is deprecated (no longer supported and will be pulled completely from Facebook at anytime).
Then your url being shared will get a id from facebook and the stats tracked. Here's some examples: http://graph.facebook.com/?ids=CocaCola or http://graph.facebook.com/?ids=http://www.coca-cola.com

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).

Facebook - syncing comments social plugin with comments on object's?

Currently i am adding the social plugins to my site. Specifically to my photo albums. To generate the albums i am using fql to grab all the albums from a certain page. So it then occurred to me that people will be commenting inside of facebook but the social plugin will only show comments for the url not for the photo's object inside facebook. I know i can get the object_id from the fql. Is there a way to link the two together so if a user comments on either my site or facebook it will be all included.
So i am a little stumped i looked around the graph api for quite some time with no luck so anybody have any ideas? :\
cheers guys
So there isn't currently a plugin that lets you put an Object_id into and it will grab all of the comments out for that object.
You will need to use the graph api and if the album is public then you will not need a oauth code to access the comments. Once you have this object just convert it to a a stand-object array and do what you will with it ;)