Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9145279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:28:31+00:00 2026-06-17T10:28:31+00:00

I am working on a android application in which I need to open a

  • 0

I am working on a android application in which I need to open a Facebook login window and then after logging successfully, I need to move to another intent (or new screen).

So as soon as user is logged in successfully, it should go to another screen in my app. I am having a very hard time making this thing to work. I have got the sample examples from the Facebook SDK so I was testing it out on those examples, I created another screen named Screen2.java(new xml file) having only a single button just to test it out.

So in my case what it should do is as soon as you are logged in successfully it should go to .Screen2 intent. So I made some changes in the Main.java class mentioned here in this tutorial but it is not working for me. Meaning as soon as I am logged in to Facebook, it doesn’t goes to .Screen2 intent that I have created. Can anyone help me out here?

I made changes only in Main.java class as below by adding new Intent in the method onAuthSucceed()–

public class SampleAuthListener implements AuthListener {

    @Override
    public void onAuthSucceed() {
        mText.setText("You have logged in! ");
        // mRequestButton.setVisibility(View.VISIBLE);
        // mUploadButton.setVisibility(View.VISIBLE);
        // mPostButton.setVisibility(View.VISIBLE);

        Intent i = new Intent(Main.this, Screen2.class);
        startActivity(i);
    }

    @Override
    public void onAuthFail(String error) {
        mText.setText("Login Failed: " + error);
    }
}

NOTE:- I am able to login into Facebook but after logging successfully, it doesn’t goes to my new Intent.

Any help will be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:28:32+00:00Added an answer on June 17, 2026 at 10:28 am

    I was under the impression you needed something like this

    private Session.StatusCallback callback = new Session.StatusCallback() {
        @Override
        public void call(Session session, SessionState state, Exception exception) {
            onSessionStateChange(session, state, exception);
        }
    };
    
    private void onSessionStateChange(Session session, SessionState state, Exception exception) {
        if (state.isOpened()) {
            Log.d(TAG, "Logged in...");
            //fire intent
        } else if (state.isClosed()) {
            Log.d(TAG, "Logged out...");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an android tablet application using phonegap in which i need to
I am working an application in which i need to open device camera in
I am working on an application that need to login with facebook . This
I am working on an android application for which I need to match the
I am working on an android application which is sort of an e-reader but
I'm working on an android application which allows users to create accounts on a
I am working on an android application which can be used to capture the
I am currently working on an android application which requires reading data from bluetooth
I am working on a Mapview in my android application, in which i have
I developed an application in the phonegap which is working good in the android

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.