通过 Android SDK 从 Facebook Graph API 获取 public 事件
Get public events from Facebook Graph API via Android SDK
我正在尝试使用以下代码从 Facebook Graph API 获取 public 事件:
val request = GraphRequest.newGraphPathRequest(
AccessToken.getCurrentAccessToken(),
"/search",
GraphRequest.Callback { response : GraphResponse ->
Log.e("E", response.toString())
}
)
val parameters = Bundle()
parameters.putString("q", "Toronto")
parameters.putString("fields", "city,state,country,description,id,start_time,end_time,name,place,street,zip")
parameters.putString("type", "event")
parameters.putString("limit", "25000")
request.parameteans = parameters
request.executeAsync()
但我得到的是一个空数据数组。当我将 "type" 字段从 "event" 更改为 "place" 时,我实际上得到了数据。
为什么我没有得到活动的数据?
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#search-4-4
You can no longer use the /search endpoint with the following object
types:
- event
- group
- page
- user
我正在尝试使用以下代码从 Facebook Graph API 获取 public 事件:
val request = GraphRequest.newGraphPathRequest(
AccessToken.getCurrentAccessToken(),
"/search",
GraphRequest.Callback { response : GraphResponse ->
Log.e("E", response.toString())
}
)
val parameters = Bundle()
parameters.putString("q", "Toronto")
parameters.putString("fields", "city,state,country,description,id,start_time,end_time,name,place,street,zip")
parameters.putString("type", "event")
parameters.putString("limit", "25000")
request.parameteans = parameters
request.executeAsync()
但我得到的是一个空数据数组。当我将 "type" 字段从 "event" 更改为 "place" 时,我实际上得到了数据。
为什么我没有得到活动的数据?
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#search-4-4
You can no longer use the /search endpoint with the following object types:
- event
- group
- page
- user