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 9259311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:37:36+00:00 2026-06-18T12:37:36+00:00

In my android application, i have two buttons login with facebook and login with

  • 0

In my android application, i have two buttons “login with facebook” and “login with twitter”.

Login with facebook

        var my_client_id = "123412312323", 
        my_redirect_uri = "http://www.facebook.com/connect/login_success.html", 
        my_type = "user_agent", 
        my_display = "touch"

        var authorize_url = "https://m.facebook.com/dialog/oauth?";
        authorize_url += "client_id=" + my_client_id;
        authorize_url += "&redirect_uri=" + my_redirect_uri;
        authorize_url += "&display=" + my_display;
        authorize_url += "&scope=publish_stream,offline_access";
        authorize_url += "&response_type=token"; 
        window.plugins.childBrowser.showWebPage(authorize_url);

using above url and child browser, i am asking user to login in Facebook.

using child browser’s on location change method, i am accessing the Facebook token form the redirection url.

I have logout button in my application, and i need to logout from facebook,

in logout method i have below facebook java script code

FB.logout(function(response) {
  alert(response.text);
});

But, i got error that saying FB.logout() called without an access token

i saw below stack overflow questions

Q1

Q2

FB.logout() works only if i used FB.login for logging into facebook, isn’t it?

so, How to logout from facebook in my app?

  • 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-18T12:37:38+00:00Added an answer on June 18, 2026 at 12:37 pm

    I used child browser to logging in with facebook as i showed above and for logging out i used same child browser for logging out of facebook.

            child_browser = window.plugins.childBrowser;
        child_browser.onLocationChange = function(loc){
            if (loc.indexOf("http://www.example.com") > -1) {
                window.plugins.childBrowser.close();
            }
        };
        child_browser.showWebPage("https://www.facebook.com/logout.php?next=http://www.example.com&access_token="+facebook_token);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two buttons within my Android application. It currently shows the two buttons
I have an android application (written in java) which has two buttons ( connect
In my android application I have two buttons, situated on a row and above
I have an android application and while switching between two activities I want to
How do I design an android application with two buttons next to each other
In my application screen, i have two buttons. one is Activate and another is
I am using Linear Layout(Horizontal) for my Android application. I am using two buttons
I have two intent filters for the root activity of my application <activity android:name=.MyActivity
I have a LinearLayout in my android application. Worked well with just the two
I am developing my first Android application. I have created a relativelayout with two

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.