Facebook页面“Like”之间有什么区别?和外部URL“Like”并且“user_likes”权限范围允许访问这两个? [英] What is the difference between a Facebook Page "Like" and an external URL "Like"? And will the "user_likes" permission scope give access to both?
问题描述
我想为用户提供所有Facebook喜欢的列表,无论是Facebook页面还是外部网址。
示例:
如果您喜欢 Facebook平台,我知道我可以通过
但是,如果你喜欢一个外部网址,我不知道如何拉那。是否应该通过 / me / likes
呼叫拉?还是有另一个电话来处理外部的喜欢?
此外,新闻源/流如何喜欢?例如,如果我喜欢我在流中看到的照片,视频,状态或链接,可以通过API访问吗?
是的,user_likes会让您访问这两个。
您可以通过喜欢 >图API 端点 / me / likes
,只要它们不是文章。类型为article的对象不代表真实世界的对象,因此我们不提供个人资料。我们在 Open Graph 文档页面上提到这一点(尽管是模糊的): https://developers.facebook.com/docs/opengraph/#types
所以如果你去我的假电影对象页面
http://fbsb.hoodlu.ms/so_7436857/video2.html
并点击,那个将在 https://graph.facebook.com上访问您的喜欢时显示/ me / likes 。
使用Graph API Explorer进行尝试:
https://developers.facebook.com/tools/explorer/?method= GET& path = me%2Flikes
如果你想要的URL在某人已经喜欢,请使用此 FQL 查询:
SELECT url FROM url_like WHERE user_id = me()
/ pre>
有关更多信息,请访问 https://developers.facebook.com/docs/reference/fql/url_like/ 。
如果您想访问喜欢 c $ c> c $ c> FQL表。只需拉出当前用户的喜好(帖子/照片/视频):
SELECT user_id,object_id,post_id FROM like WHERE user_id = me()
从那里你会查询
流
表格以获取更多信息。
喜欢
表格文档: https://developers.facebook.com/docs/reference/fql / like / 。
stream
表格文档: https://developers.facebook.com/docs/reference/fql/stream/I'd like to pull a list of all Facebook "Likes" for a user, whether they are Facebook pages or external URLs.
Example:
If you "Like" the Facebook Platform, I know I can see it via the
/me/likes
API call.However, if you like an external URL, I'm not sure how to pull that. Are both supposed to be pulled via the
/me/likes
call? Or is there another call to handle external likes?Further, what about newsfeed / stream likes? For example, if I "Like" a photo, video, status or link that I see in my stream, is that accessible via the API? If so, how is this accessed?
解决方案Yes, user_likes will give you access to both.
You can access external likes as you wish through the Graph API endpoint
/me/likes
, as long as they're not articles. Objects with type "article" do not represent real-world objects and as such, we don't provide on a person's profile. We mention this (albeit obscurely) on the Open Graph documentation page: https://developers.facebook.com/docs/opengraph/#typesSo if you go to my fake movie object page at
http://fbsb.hoodlu.ms/so_7436857/video2.html
and click like, that will show up when you access your likes on https://graph.facebook.com/me/likes.
Try it using the Graph API explorer:
https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Flikes
If you want the URLs that someone has liked, use this FQL query:
SELECT url FROM url_like WHERE user_id = me()
More information is available at https://developers.facebook.com/docs/reference/fql/url_like/.
If you want to access the likes from a post, photo, video, etc. you'll need to use the
like
andstream
FQL tables. To just pull out the likes (of posts/photos/videos) for the current user:SELECT user_id, object_id, post_id FROM like WHERE user_id=me()
From there, you would query the
stream
table for the post to get more information.
like
table documentation: https://developers.facebook.com/docs/reference/fql/like/.
stream
table documentation: https://developers.facebook.com/docs/reference/fql/stream/这篇关于Facebook页面“Like”之间有什么区别?和外部URL“Like”并且“user_likes”权限范围允许访问这两个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!