facebook graph api 搜索规则
有谁知道 facebook graph api 可以接受什么布尔逻辑吗?他们拥有开发者世界中已知的最差的文档、论坛和帮助。我尝试使用 OR,但它似乎不起作用。 AND 似乎暗示着空格或逗号。我正在尝试搜索多个术语或使用 OR 和 NOT。
Does anyone have any idea what boolean logic is acceptable on the facebook graph api? They have the worst documentation, forums, assistance known to the developer world. I tried using OR and it does not seem to be working. AND seems to be implied with spaces or commas.I am trying to search for multiple terms or using OR and NOT.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
搜索帖子时,您可以执行 AND 和 OR 操作,例如:
http://graph.facebook.com/search?q= watermelon%20|%20banana&type=post
可以与空格或 + 一起使用的 AND 运算符:
http://graph.facebook.com/search?q=watermelon%20banana& ;type=post
您也可以使用“”搜索“bruce lee”等术语:
search?q="bruce lee"&type=post
恢复:" | " = OR
“”和“+”= AND
我没有找到使用 NOT 运算符的方法
,我同意,这是有史以来最糟糕的 API 文档。
You can do AND and OR, when searching for posts, like:
http://graph.facebook.com/search?q=watermelon%20|%20banana&type=post
The AND operator you can use with space or +:
http://graph.facebook.com/search?q=watermelon%20banana&type=post
You can search for terms like "bruce lee" too, using "":
search?q="bruce lee"&type=post
Resuming: " | " = OR
" " and "+" = AND
I did not find a way to use the NOT operator
And I agree, it is the worst API documentation ever.
看来,|不再起作用了,我今天才发现它。只找到与查询中的所有单词匹配的帖子。
It seems, | is not working any more, I've just discovered it today. Only posts matching ALL words from query are found.
仅供分享:
从 2015 年 4 月 30 日起,将不再支持“POST”搜索。请参阅 https://developers。 facebook.com/docs/apps/upgrading#upgrading_v2_0_graph_api 在“已删除的端点”段落下:
Only to share:
'POST' search will no longer be possible from April 30th 2015. See https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_graph_api under the paragraph "Removed endpoints":
现在,如果您在搜索词中输入多个单词,并用空格分隔 - 那么您应该返回包含这些单词的相关实体(实体中的任何位置,以任何顺序)。 “李小龙”——> “布鲁斯是个好人,他喜欢李”可能是一个结果。
没有有效的“或”运算符。
我在 Facebook 上打开了一个案例,几个小时后就关闭了,因为它“按指定方式工作”:https://developers.facebook.com/x/bugs/138296099674000/
我不能不同意这种说法的正确性(特别是考虑到上面 @tesserex 和 @vbNewbie 的观察),但我们不要放弃。
因为我认为我们都同意当前的功能是有限的/受限的,所以我想鼓励所有同意我的人打开错误报告和/或功能请求(如何打开 FB 的功能请求?)这将得到正确的优先级。
我不认为当前的功能对 Facebook 或开发者有任何好处,而且我认为 FB 不应该花大力气来显着改进它。
所以让我们轻轻地施加一些压力;-)
Right now if you enter a number of words in the search term, separated by space - then you should get back relevant entities that have those words (anywhere in the entity, in any order). "bruce lee" --> "Bruce is a nice guy, he likes Lee" would be a possible result.
There is no "or" operator that works.
I opened a case at Facebook, which was closed hours later for the reason it "works as specified" here: https://developers.facebook.com/x/bugs/138296099674000/
Obviously I can't disagree with the correctness of this claim (especially given @tesserex and @vbNewbie 's observations above) BUT let's not give up.
Since I think we all agree the current functionality is limited / limiting, I would like to encourage all of the people that agree with me to open bug reports and / or feature requests (how do you open a feature req. for FB?) so that this will get prioritized correctly.
I don't think the current functionality does Facebook or the developers any good, and I don't think it should be a major effort for FB to improve it significantly.
So let's gently apply some pressure ;-)
它不再像那样工作了,但我发现现在可以工作了(搜索西瓜或香蕉:http://graph.facebook.com/search?q=watermelon&q=banana&type=post
It's not working like that anymore, but I'm finding that this will work now (for search for watermelon OR banana: http://graph.facebook.com/search?q=watermelon&q=banana&type=post