用户是否“喜欢”?已经有 Facebook 帖子了
我已经尝试解决这个问题有一段时间了,并且慢慢意识到我拨打的电话并不是我想要的电话。
我目前正在获取用户新闻源并添加一个“喜欢”按钮,但如果他们已经喜欢它,则应该说“不喜欢”。
我打电话给/me/likes?...并获得了一些数据(我通过比较新闻源中的每个帖子ID来进行搜索),但我刚刚意识到这些数据与用户喜欢的页面有关。它不会返回用户喜欢的帖子。
我的问题是如何确定用户是否已经喜欢某个帖子?(我担心我必须为新闻源中的每个帖子调用 api 来确定用户是否喜欢该帖子,但这会大大减慢速度移动应用程序)。
I have been trying to solve this one for a while now and have slowly realised that the call im making is not the desired call for what i want.
I am currently getting the users newsfeed and adding a like button but if they like it already it shold say unlike.
i call /me/likes?... and get a couple of bits of data (which i trawl through comparing each post id in newsfeed) but I have just realised this data is to do with pages that the user has liked. It doesn't return the posts the user has liked.
My question is how do i determine if the user has liked a post already?(my fear is that i have to make a call to the api for each post in the newsfeed to determine if the user likes this post but that would drastically slow down a mobile app).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用 FQL
like
表:结果类似于:
在
fql.query
控制台。Simply using FQL
like
table:And the result will be something like:
It's always a good idea to test your queries in the
fql.query
console.