获得普通“喜欢”的最佳方式从您的朋友列表中的公开信息页面 [英] Best way to get common "likes" from public info page out of your friends list

查看:119
本文介绍了获得普通“喜欢”的最佳方式从您的朋友列表中的公开信息页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取一个用户和他的朋友之间常见的喜欢(公开)的列表。我认为这个FQL查询可以正常工作,但是我收到一个未知的用户错误:

I'm trying to get a list of common likes (public) between a user and his friends. I thought this FQL query would work but I'm getting an unknown user error:

- 获取你拥有的page_id,你的任何朋友都有

--get page_id that you have and any of your friends have

https://api.facebook.com/method/fql.query?query=
select uid, page_id from page_fan where uid in (SELECT uid2 FROM friend WHERE uid1 = me()) and page_id in (select page_id from page_fan where uid= me())
&access_token=ABC

我收到此错误:

<error_response><error_code>1</error_code><error_msg>An unknown error occurred</error_msg></error_response>

任何建议?

推荐答案

似乎结果集是API来处理的方式。你最好的办法是尝试通过查询一组朋友来对用户的喜好进行限制,或者一次查询一个,两个...等页面(如果还没有尝试使用 LIMIT 你的朋友说100,以确保你实际上得到的东西)。 查询的示例

It seems that the result set is way to big for the API to handle. Your best bet is to try to limit the result set by either query a set of friends against the user's like or query one, two ...etc pages at a time (if that also didn't work try to LIMIT your friends to say 100 to make sure you are actually getting something). Example of a query:

select uid, page_id 
from page_fan 
where uid in (
    SELECT uid2 
    FROM friend 
    WHERE uid1 = me()
) and page_id in (
    select page_id 
    from page_fan 
    where uid= me() 
    LIMIT 1
)

显然,FQL中没有 offset 。首先,您需要检索用户的喜好,然后对它们进行查询。您可以随时使用批处理API 在单次批量呼叫中进行多个呼叫。

Obviously there is no offset in FQL. So first, you need to retrieve the user's likes and then query against them. You can always use the batch api to make multiple calls in a single batch call.

这篇关于获得普通“喜欢”的最佳方式从您的朋友列表中的公开信息页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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