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

  • Home
  • SEARCH
  • 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 8808069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:31:37+00:00 2026-06-14T02:31:37+00:00

In previous android SDK, I asked new permission by calling Facebook.authorize() and it showed

  • 0

In previous android SDK, I asked new permission by calling Facebook.authorize() and it showed approving permission screen. But in SDK 3.0, when I call FacebookActivity.openSessionForPublish() , dialog always shows login form. How can I show approving permission screen?

I’ve set up session that has token and expiration date and its SessionState is CREATED_TOKEN_LOADED .

Is there any requirement for showing permission dialog or does Facebook.authorize() always show login form? Then please teach me right method for that.

My code is like below

 public class FbConn extends FacebookActivity {
    public void onCreate(Bundle savedInstanceState) {
       ...
       if( savedInstanceState == null ) {
          Session savedSession = CommonUtil.getFbSession(CustomSessionStore.getFbInfo(getApplicationContext())); //get access token and expiration date from session store and set up new session.
          Session.setActiveSession(savedSession); 
          setSession(savedSession);
       }

    }

    protected void onStart() {
       super.onStart();
       openSessionForPublish(EpisodeApplication.config.getSelectedServer().fbAppId, Constants.FB_PERMISSIONS);
    }

 }

Update

I’ve commented out these lines and permission request screen showed successfully. But I don’t sure this is right way or not.

In com.facebook.LoginActivity line 62,

Utility.clearFacebookCookies(this);

In com.facebook.Session line 1202,

Utility.clearFacebookCookies(getStaticContext());
  • 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-14T02:31:38+00:00Added an answer on June 14, 2026 at 2:31 am

    If you already have a valid session, from a previous auth flow, then if you want to request new permissions then use the Session.ReauthorizeRequest class.

    Session.ReauthorizeRequest reauthRequest = new Session
                    .ReauthorizeRequest(this, Constants.FB_PERMISSIONS);
    session.reauthorizeForPublish(reauthRequest);
    

    This should show a permissions screen for the new permissions you’re asking for instead of the login form.

    However, from looking at your logic it is not clear where you’re handling the first time login. If you expect to handle it in this class then I suggest using the following:

    Session.openActiveSession(this, true);
    

    This will open up a login form if there is no cached token. If there is a cached token, it will create a new Session and make it active. This will open a session with basic permissions (if the user needs to log in) or open a session with the permissions based on the cached token retrieved. You can then call the re-auth methods to ask for publish permissions. You’ll want to do that in context and typically do not want to call call the auth functions back to back, i.e. log the user in, then immediately ask for publish permissions.

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

Sidebar

Related Questions

After finally getting the Android Facebook SDK to properly import thanks to this ,
I have built a new development machine and installed Android SDK. I tried to
for Lock Screen programmatically using Android. I got some good ideas from Stackoverflow previous
So, with new google-admob SDK for android correct way to place banner ad in
I am using the following android fb connect library. http://github.com/facebook/facebook-android-sdk/ problem is after successful
This post if a follow-up question to mt previous post: Android RESTful Web application
Is Sencha Touch 2 supported by Android? Also, is senchatouch2 backward compatible with previous
Clarification: My previous Android development environment has been a Win7 machine using command-line build
<ImageButton android:id=@+id/previous android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/media_skip_backward android:background=@drawable/transparent></ImageButton> This is what I tried to get a
< RelativeLayout android:layout_width=wrap_content android:layout_height=wrap_content> < Button android:text=Previous android:layout_height=wrap_content android:id=@+id/MeasurePrev android:layout_alignParentBottom=true android:layout_width=wrap_content> < / Button>

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.