获得共同“喜欢”的最佳方式从公共信息页面 从您的朋友列表中
我正在尝试获取用户和他的朋友之间的共同喜欢(公开)的列表。我认为这个 FQL 查询会起作用,但我收到了一个未知的用户错误:
--get page_id 你和你的任何朋友都有
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>
有什么建议吗?
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:
--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
I'm getting this error:
<error_response><error_code>1</error_code><error_msg>An unknown error occurred</error_msg></error_response>
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来结果集对于 API 来说太大了,无法处理。您最好的选择是尝试通过根据用户的喜好查询一组朋友或一次查询一个、两个...等页面来限制结果集(如果这也不起作用,请尝试
LIMIT< /code> 你的朋友说 100 以确保你确实得到了一些东西)。 <一href="http://developers.facebook.com/tools/explorer/?method=GET&path=fql?q=select%20uid,%20page_id%20from%20page_fan%20where%20uid%20in%20%28SELECT%20u id2%20FROM%20friend%20WHERE%20uid1%20=%20me%28%29%29%20and%20page_id%20in%20%28select%20page_id%20from%20page_fan%20where%20uid=%20me%28%29%20LIMIT% 201%29" rel="nofollow">查询示例:
显然,FQL 中没有
offset
。因此,首先,您需要检索用户的喜好,然后对其进行查询。您始终可以使用 批处理 api 在单个批处理调用中进行多个调用。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: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.SELECT page_id from page_fan WHERE uid = me() 和 page_id IN ( SELECT page_id from page_fan WHERE uid = 在这里隐藏一个 )
SELECT page_id from page_fan WHERE uid = me() and page_id IN ( SELECT page_id from page_fan WHERE uid = give one hid here )