获得共同“喜欢”的最佳方式从公共信息页面 从您的朋友列表中

发布于 2024-12-17 18:05:37 字数 555 浏览 0 评论 0原文

我正在尝试获取用户和他的朋友之间的共同喜欢(公开)的列表。我认为这个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

少跟Wǒ拽 2024-12-24 18:05:37

看来结果集对于 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">查询示例:

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 在单个批处理调用中进行多个调用。

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
)

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.

初相遇 2024-12-24 18:05:37

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 )

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文