I followed the tutorial on Facebook authentication and copied the following code into my Android app.
private Session.StatusCallback callback = new Session.StatusCallback() { @Override public void call(Session session, SessionState state, Exception exception) { onSessionStateChange(session, state, exception); } };
However, it gives me the following errors:
Session.StatusCallback cannot be resolved to a type
This leads to the following errors:
callback cannot be resolved to a variable
There are also other places where Facebook API calls are called that give me errors, but this is not in all Facebook API calls. Another place where I get the error message is the following:
Request request = Request.newMeRequest(session, new Request.GraphUserCallback() { @Override public void onCompleted(GraphUser user, Response response) { // If the response is successful if (session == Session.getActiveSession()) { if (user != null) { // Set the id for the ProfilePictureView // view that in turn displays the profile picture. Log.d("MainActivity", "onComplete() User logged in"); parent.owner = MainKickback.userConnection.add(new User(user.getId())); EventFragment e = (EventFragment) fragments[UPCOMING_EVENTS]; e.populateEvents(); } } if (response.getError() != null) { // Handle errors, will do so later. } } }); request.executeAsync();
where it does not recognize Request.GraphUserCallback and then executeAsync (). I get the following errors:
Request.GraphUserCallback cannot be resolved to a type The method executeAsync() is undefined for the type DownloadManager.Request
Does anyone have any tips on how to fix this?
Thank you for your help!
source share