0

My requirement is to get the list of top N videos being shared on facebook, twitter. When i say top, i mean it would be based on likes, shares, tweets, retweets etc.

The question from where I am coming is the way how youtube provides a list of top N videos through its api. I need to get similar information for facebook and twitter.

Can somebody suggest ? Thanks.

1 Answers1

0

I have never asked myself how to do this, but would proceed in the following way, based on the Video URL: Twitter: search for all tweets with that URL using the search API and count the number of tweets(?). A previe of the results can be found in the search tool on Twitter (this is a sample query with a random video https://twitter.com/search?q=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTD7oMzfA9fY&src=typd) Facebook: make a query to the graph API, and search for shares/likes of the video url. You have many discussions here on SO that address how to to that. Examples are here How do you get the total likes for a URL (Likes and Shares)? and here How to get share counts using graph API (Facebook). For Twitter, you may refer to the Developers site?

Shortcomings: this solution, albeit simple, is not exhaustive. If you are planning to count shares and the "social buzz" of Youtube videos, bear in mind that Youtube has different urls for one video, and that the query on both Twitter and Facebook is based on the actual URL shared. Twitter users tend to post shortened urls, so it may be difficult to count the tweets about a video with the url only.

Community
  • 1
  • 1
tattvamasi
  • 845
  • 1
  • 7
  • 14
  • Thanks for your reply. I have already gathered statistics for particular video urls like passing the url to the api. But here I am looking for top 20 videos at a global level. You can imagine a person wanting to analyze data by seeing which are running as the top 20 videos for today ? This has to be from the global search and not for any specific video url – user3733683 Jun 12 '14 at 11:11
  • apologies, I thought you were looking for something to grade the top 20 videos in your own data set (most popular maong those submitted by your users, or something similar). I am not sure it's possible to get the top popular videos on Twitter or Facebook... – tattvamasi Jun 12 '14 at 11:14