0

我做了一个 fql 查询,它返回有关单个 url 的详细信息。在这一点上,我为网站上的每个页面创建了一个新查询——这显然不是很有效。有没有办法创建一个返回所有页面及其详细信息的查询。例如:我现在得到的:

<fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" list="true">
<link_stat>
<url>www.facebook.com</url>
<normalized_url>http://www.facebook.com/</normalized_url>
<share_count>50783153</share_count>
<like_count>2482551</like_count>
<comment_count>2371768</comment_count>
<total_count>55637472</total_count>
<commentsbox_count>0</commentsbox_count>
<comments_fbid>10150187081535131</comments_fbid>
<click_count>243646</click_count>
</link_stat>
</fql_query_response>

我需要的:

<fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" list="true">
<link_stat>
<url>www.facebook.com</url>
<normalized_url>http://www.facebook.com/</normalized_url>
<share_count>50783153</share_count>
<like_count>2482551</like_count>
<comment_count>2371768</comment_count>
<total_count>55637472</total_count>
<commentsbox_count>0</commentsbox_count>
<comments_fbid>10150187081535131</comments_fbid>
<click_count>243646</click_count>
</link_stat>

<link_stat>
<url>www.yahoo.com</url>
<normalized_url>http://www.yahoo.com/</normalized_url>
<share_count>50783153</share_count>
<like_count>2482551</like_count>
<comment_count>2371768</comment_count>
<total_count>55637472</total_count>
<commentsbox_count>0</commentsbox_count>
<comments_fbid>10150187081535131</comments_fbid>
<click_count>243646</click_count>
</link_stat>
</fql_query_response>
4

1 回答 1

0

您应该尝试关闭此问题,以便将其标记为已解决。

回顾一下,您的 IN() 和对域字符串的引用出现了一些问题

 IN('www.facebook.com, www.yahoo.com')

应该

 IN('www.facebook.com', 'www.yahoo.com')

http://api.facebook.com/method/fql.query?query=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,%20commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat% 20WHERE%20url%20IN ('www.facebook.com',%20'www.yahoo.com')

于 2012-08-28T03:40:26.490 回答