gpt4 book ai didi

facebook - FB Graph Api - 在群组提要中搜索

转载 作者:行者123 更新时间:2023-12-02 22:12:55 31 4
gpt4 key购买 nike

我有一个封闭的 FB 群组,我可以通过 FB Graph API 发布它

$postResult = $this->facebook->api("/GROUP_ID/feed", "GET",);

但我现在想找到带有一些“搜索字符串”的帖子。我试过了

$postResult = $this->facebook->api("/GROUP_ID/feed", "GET", array('query' => "SEARCH_STRING"));

$postResult = $this->facebook->api("/GROUP_ID/search", "GET", array('query' => "SEARCH_STRING"));

但是还是不行。有什么方法可以在群组帖子中搜索吗?

最佳答案

你不能这么做。您只能将搜索 API 与端点 /search 结合使用。搜索的格式为:

GET graph.facebook.com
/search?
q={your-query}&
[type={object-type}]

在此处查看可用的搜索类型:https://developers.facebook.com/docs/graph-api/using-graph-api#searchtypes

不允许使用 /{object-id}/search 或任何其他格式。

您可以循环遍历所有结果并在最后进行搜索。

关于facebook - FB Graph Api - 在群组提要中搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23032112/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com