通过关键词搜索Facebook群组的方法 [英] Methods of searching for Facebook groups by keywords

查看:277
本文介绍了通过关键词搜索Facebook群组的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Facebook graph API通过关键字搜索Facebook组.我用过

I'd like to use the Facebook graph API to search for Facebook groups by keyword. I've used

search?q = keyword& type = group

search?q=keyword&type=group

在图形API资源管理器中运行良好,但是它要求我生成一个用户访问令牌.我还阅读了Facebook API文档中的以下内容

in the graph API explorer and it works well, however it requires I generate a user access token. I've also read the below on the facebook API documentation

还有另一种方法可以调用Graph API,而无需使用生成的应用程序令牌.调用时,您只需传递应用程序ID和应用程序密钥作为access_token参数即可:

"There is another method to make calls to the Graph API that doesn't require using a generated app token. You can just pass your app id and app secret as the access_token parameter when you make a call:

http://graph.facebook.com/endpoint?key=value& access_token = app_id | app_secret "

但是,当我尝试这种方法时,它会以

However when I try this method it errors out with

"{"错误:{"消息:"(#200)必须具有有效的access_token才能访问此端点,"类型:" OAuthException,"代码:200}}""

"{"error":{"message":"(#200) Must have a valid access_token to access this endpoint","type":"OAuthException","code":200}}"

我不明白为什么这需要用户访问令牌.我要执行的搜索与我只想要一组匹配组的用户无关.

I cant understand why this needs a user access token. The search I want to perform has nothing to do with any users I just want a list of matching groups.

如何从服务器上以我的Facebook应用程序执行此搜索?

How can I perform this search as my facebook app from my server?

推荐答案

根据特定的搜索文档,您需要一个用户访问令牌.

According to the specific search documentation, you need a User Access Token.

所有Graph API搜索查询均要求请求中包含访问令牌.您需要的访问令牌的类型取决于您正在执行的搜索的类型.

All Graph API search queries require an access token included in the request. The type of access token you need depends on the type of search you're executing.

  • 在Page和Place对象之间进行搜索需要应用访问令牌.
  • 所有其他端点都需要用户访问令牌.

这篇关于通过关键词搜索Facebook群组的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆