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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:29:14+00:00 2026-05-30T01:29:14+00:00

The user of my Android app should be enabled to post a message to

  • 0

The user of my Android app should be enabled to post a message to his facebook wall.

I used this tutorial as basis for my development:
Link to tutorial

So far it is working fine if I have not installed the official facebook app. Thus the code uses the webview and not SSO.

But if I install the Facebook app on the same device following happens:
Pressing the “Post to facebook button” in my app opens shortly the facebook app. But it closes immediatley and returns to my app.

The only workaround I have found so far is to use Facebook.FORCE_DIALOG_AUTH:

facebook.authorize(this.activity, this.permissions,Facebook.FORCE_DIALOG_AUTH,new LoginDialogListener());

But this avoids SSO and always webview is used. There are Android apps out there which use the official facebook app and do SSO. But I searched the whole weekend for a solution without getting a clue how they are doing it.

Puting the android key hash to facebook also didnt change anything.

  • 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-05-30T01:29:15+00:00Added an answer on May 30, 2026 at 1:29 am

    I’m not sure why you went with the tutorial when facebook has an up to date tutorial of their own: http://developers.facebook.com/docs/mobile/android/build/

    The official tutorial discuss a lot of issues, including signing it so that it would work in development stage as well. It also of course talks about authentication and the SSO, here’s what you need for SSO:

        Facebook facebook = new Facebook("YOUR_APP_ID");
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
    
            facebook.authorize(this, new DialogListener() {
                @Override
                public void onComplete(Bundle values) {}
    
                @Override
                public void onFacebookError(FacebookError error) {}
    
                @Override
                public void onError(DialogError e) {}
    
                @Override
                public void onCancel() {}
            });
        }
    
        @Override
        public void onActivityResult(int requestCode, int resultCode, Intent data) {
            super.onActivityResult(requestCode, resultCode, data);
    
            facebook.authorizeCallback(requestCode, resultCode, data);
        }
    

    And that’s all.
    Please, read the official tutorial and follow their instructions, it should work well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Android, you can specify the Linux user under which your app should run.
I am developing an android app where a user has to enter his login
I am trying to develop an android app, where user should be able to
In my Android app I should store the data from user in simple text-file,
I am developing an Android app where the user has the facility of Facebook
How to bring up a constantly appearing screen in android, user should not be
I am making an android app that publishes facebook posts. I want it to
My Android app consists of a simple tablayout (3 tabs). Let's say the user
I'm creating an Android app, when a user clicks a button in the app
To begin with, this is the first Android app I'm writing, and I have

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.