如何确定 Facebook 用户是否喜欢某个 URL?
我们有一个网络应用程序,需要跟踪用户对 URL(不是 Facebook 页面,外部页面)的“喜欢”,因为他们会因此获得积分。
为此,我们使用 JQuery 和订阅 (edge.create) 事件,它运行良好。 http://developers.facebook.com/docs/reference/javascript/ FB.Event.subscribe/
不幸的是,我们似乎无法找到一种方法来处理用户通过我们的网站“喜欢”某个 URL,获得积分,然后转到他们的 Facebook 墙并“不喜欢”的情况它本质上是在欺骗系统。
我尝试了这两个 FQL 查询。第一个应该返回 URL 的对象 ID,第二个应该返回“喜欢”该 URL 的 user_ids 列表。但它们似乎不一致,并且并不总是为我测试的每个案例返回数据。
我们不想让用户通过 Facebook 授权我们的应用程序,并给我们访问他们的数据的权限,以便使这项工作正常进行。
有什么想法吗?提前致谢!
We have a web app where we need to track users "Likes" of URLs (not Facebook pages, external ones), because they earn credits for doing so.
To do this we're using JQuery and the subscribe (edge.create) event and it's working great.
http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
Unfortunately we can't seem to figure out a way handle the case where a user "Likes" a URL through our site, earns a credit, then goes to their Facebook Wall and "Unlikes" it, essentially cheating the system.
I played around with these two FQL queries. The 1st is supposed to return an object ID of a URL, and the 2nd should return the list of user_ids who "Like" the URL. But they seem inconsistent and don't always return data for every case I tested.
We'd rather not have to get the users to authorize our app with Facebook, and give us permission to access their data, in order to make this work either.
Any ideas? Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 FQL 的见解表中,您有指标 "domain_fan_removes" 、 "page_fan_removes" 、 "application_like_removes" 和 "domain_like_removes"
http://developers.facebook.com/docs/reference/fql/insights/
这可能会有所帮助。
https://api.facebook.com/method/fql.query?query=SELECT%20metric,value%20FROM%20insights%20WHERE%20object_id=118584441503782%20AND%20metric='page_fan_removes'%20AND%20end_time= end_time_date('2011-02-01')%20AND%20period=period('lifetime')&access_token=xxxxx
In in insights table of FQL you have metrics "domain_fan_removes" , "page_fan_removes" , "application_like_removes" and "domain_like_removes"
http://developers.facebook.com/docs/reference/fql/insights/
This might help.
https://api.facebook.com/method/fql.query?query=SELECT%20metric,value%20FROM%20insights%20WHERE%20object_id=118584441503782%20AND%20metric='page_fan_removes'%20AND%20end_time=end_time_date('2011-02-01')%20AND%20period=period('lifetime')&access_token=xxxxx
通过 JS Api,您可以使用
FB.Event.subscribe
,或者如果用户不喜欢某个网址,则可以使用 edge.remove:
https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
With the JS Api you can use the
FB.Event.subscribe
,or you can use edge.remove if user unlike a url:
https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/