0
Session currentSession = Session.getActiveSession();
if (currentSession.isOpened()) {
Request req = new Request(currentSession, "/me/friends?fields=id,name,installed,picture",null, HttpMethod.GET,
new Callback() {
@Override
public void onCompleted(Response response)
{
//CODE..
}
});
Request.executeBatchAsync(req);
}
得到这样的回应。Android新的Facebook SDK例外图请求
{Response: responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 2500, errorType: OAuthException, errorMessage: An active access token must be used to query information about the current user.}, isFromCache:false}
这段代码有什么问题。
权限提供了 “publish_stream”, “user_likes”, “电子邮件”, “user_birthday”, “user_interests”, “user_friends”
对于我,这样做的错误已经消失。但是JSON中的数据是空的,而总而言之,它正确地返回了我的朋友的数量,但没有数据。任何建议? –
@SwapnilPatil:你能解决这个问题吗?我仍然得到数据数组为空 –
@Sunny:你能告诉我如何解决空阵列问题?使用这种格式时,我得到一个空数据数组。 –