I am using the Facebook Android SDK and want to close my Activity after a user logs in and gets the user object. In practice I am storing parts of it but I want to close the activity regardless.
// 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
}
}
});
The IDE error message on finish()
is: "Cannot make a static reference to the non-static method finish() from the type Activity"
how to proceed?