我正在使用 Facebook Android SDK 并希望在用户登录并获取用户对象后关闭我的活动。在实践中,我存储了其中的一部分,但无论如何我都想关闭活动。
// make request to the /me API
Request.executeMeRequestAsync(session, new Request.GraphUserCallback() {
// callback after Graph API response with user object
@Override
public void onCompleted(GraphUser user, Response response) {
if (user != null) {
finish(); // causes errors
}
}
});
IDE错误消息finish()
是:"Cannot make a static reference to the non-static method finish() from the type Activity"
如何进行?