我使用 Facebook SDK 获取基本用户信息。我可以登录,但我无法退出。对于注销,我使用了这段代码
public void logoutFromFacebook() {
mAsyncRunner.logout(this, new RequestListener() {
@Override
public void onComplete(String response) {
Log.d("Logout from Facebook", response);
if (Boolean.parseBoolean(response) == true) {
Intent intent = new Intent(getBaseContext(),MainActivity.class);
startActivity(intent);
}
}
@Override
public void onIOException(IOException e) {
}
@Override
public void onFileNotFoundException(FileNotFoundException e) {
}
@Override
public void onMalformedURLException(MalformedURLException e) {
}
@Override
public void onFacebookError(FacebookError e) {
}
});
}
在日志中:响应是:
{"error_code":3,"error_msg":"Unknown method","request_args":[{"key":"access_token","value":"CAAIHzpeuZAgcBAP9Ik9zAkVYoqEPQH4pIU3GDX0nmOFPGygHhzUrHXn3qKiiCZA4bmcE5tHg8cT1JcfWkoep1ZC3JmmmGUktT45GiDHqJUDvqzrxyaTqP6ZCcTcAbaZBkEmAbmitwd2xll5okZAXlElLKPxE3LEGdPE3FB9mmzyQZDZD"},{"key":"method","value ":"auth.expireSession"},{"key":"format","value":"json"}]}
你能帮我解决这个问题吗?