在Facebook / Twitter上获取热门视频 [英] Get top videos on facebook/twitter

查看:432
本文介绍了在Facebook / Twitter上获取热门视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是获得在Facebook,Twitter上分享的前N个视频的列表。
当我说顶部,我的意思是它将基于喜欢,分享,推特,转发等。

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.

我来的地方的问题是YouTube如何通过其api提供前N个视频的列表。
我需要获得类似的Facebook和Twitter的信息。

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.

推荐答案

我从来没有问过自己如何做到这一点,在视频网址上​​:
Twitter :使用搜索API搜索与该网址的所有推文,并计算推文数(?)。结果的一个原因可以在Twitter上的搜索工具中找到(这是一个随机视频的示例查询 https://twitter.com/search?q=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTD7oMzfA9fY& src = typd
Facebook :查询图形API,并搜索视频网址的共享/喜欢。你在这里有很多讨论,讨论如何做到这一点。示例在这里你好吗得到一个URL(喜欢和分享)的总喜欢?和这里如何使用图形API获得分享数据(Facebook)。对于Twitter,您可以参考开发者网站?

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?

缺点:此解决方案虽然简单,但并不详尽。如果您打算计算Youtube和YouTube视频的社交嗡嗡声,请注意,YouTube对于一个视频具有不同的URL,而且在Twitter和Facebook上的查询均基于实际的URL共享。 Twitter用户倾向于发布缩短的网址,因此可能很难对带有网址的视频的推文进行计数。

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.

这篇关于在Facebook / Twitter上获取热门视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆