有没有办法以编程方式检查用户是否在Facebook上分享了一个链接? [英] Is there a way to programmatically check if a user shared a link on Facebook?
问题描述
我目前正在使用jQuery在我的网站上的Facebook共享链接上记录每次点击,但我正在寻找一个更准确的解决方案。我不想记录点击,而是要记录实际的份额。有没有办法在用户共享链接后从Facebook获取回复消息?
I'm currently using jQuery to record each click on a Facebook share link on my site, but I'm looking for a more accurate solution. Instead of recording the clicks, I'd like to record the actual "shares". Is there a way to get a response message back from Facebook after the user shares a link?
推荐答案
我今天遇到了: http://graph.facebook.com/http://stackoverflow.com
它返回指定网址的总共计数。我的应用程序中的每个用户都有唯一的URL,所以我可以通过使用这个方式轻松跟踪他们的共享。
It returns a total share count for a specified URL. I have unique URLs for each user in my application so I can track their shares easily by using this.
它也适用于twitter: http://urls.api.twitter.com/1/urls/count .json?url = http://stackoverflow.com
It also works for twitter: http://urls.api.twitter.com/1/urls/count.json?url=http://stackoverflow.com
这篇关于有没有办法以编程方式检查用户是否在Facebook上分享了一个链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!