Reputation: 57
Hi guys i'm making an app that has the Facebook log in option, but i need it to take the user to the main activity (Which contains 4 fragments), i already made the log in work, but it stays in the activity where the log in button is located. How can i make the Facebook log in button take me to the main activity?
Upvotes: 0
Views: 90
Reputation: 24185
private void onSessionStateChange(Session session, SessionState state, Exception exception) {
if (state.isOpened()) {
Log.i(TAG, "Logged in...");
} else if (state.isClosed()) {
Log.i(TAG, "Logged out...");
}
}
There is in facebook sdk as any other sign in sdk a callback method of fail and success.
on success just launch ur main activity or finish the current one as u wish.
Upvotes: 1