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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:21:54+00:00 2026-06-19T04:21:54+00:00

The flow of action on this android app is – UserX registers on facebook

  • 0

The flow of action on this android app is –

  1. UserX registers on facebook
  2. UserX grants read_permissions
  3. UserX grants publish_permissions
  4. His access_token is stored in our database.
  5. UserX logs out

  6. UserY registers … [follows same steps]

Since it requires login of multiple users I need to SUPPRESS_SSO (thanks to How to disable Single SIgn On for facebook android app?).

Now in facebook API 3.0, Facebook has made ReadPermissions and PublishPermissions different. I am succesfully asking for both the permissions, but it requires the user to login twice (since SSO is suppressed and webview is displayed) – the login webview pops up once again – the user has to put in his email and password. I want to access the PublishPermissions, or the ReadPermissions (in any order) without the user having to retype his password.

Relevant functions from the java code is shown here:

private static final List<String> PERMISSIONS = Arrays.asList("user_photos", "read_friendlists", "email", "publish_actions", "publish_stream");


private void updateView() {
    Session session = Session.getActiveSession();
    if (session.isOpened()) {
        handleAnnounce();
        textInstructionsOrLink.setText(ACKNOWLEDGE_USER);
        buttonLoginLogout.setText(R.string.logout);
        buttonLoginLogout.setOnClickListener(new OnClickListener() {
            public void onClick(View view) { 
               onClickLogout(); 
            }
        });
    } else {
        textInstructionsOrLink.setText(R.string.login);
        buttonLoginLogout.setText(R.string.login);
        buttonLoginLogout.setOnClickListener(new OnClickListener() {
            public void onClick(View view) { 
                onClickLogin();
            }
        });
    }
}

private void onClickLogin() {
    Session session = Session.getActiveSession();
    if (!session.isOpened() && !session.isClosed()) {
        Session.OpenRequest openRequest = new Session.OpenRequest(this).setCallback(statusCallback);
        List<String> readPermissions = Arrays.asList("user_photos", "email", "read_friendlists");
        openRequest.setPermissions(readPermissions);
        openRequest.setLoginBehavior(SessionLoginBehavior.SUPPRESS_SSO);
        session.openForRead(openRequest);
    } else {
        Session.openActiveSession(this, true, statusCallback);
    }
}


private void requestPublishPermissions(Session session) {
    Log.d(LOG_TAG, "Requesting Publish Permissions...");
    if (session != null) {
        List<String> publishPermissions = Arrays.asList("publish_actions", "publish_stream");
        final int REAUTH_ACTIVITY_CODE = 100;
        Session.NewPermissionsRequest reauthRequest = new Session.NewPermissionsRequest(this, publishPermissions).setRequestCode(REAUTH_ACTIVITY_CODE);
        reauthRequest.setLoginBehavior(SessionLoginBehavior.SUPPRESS_SSO);
        session.requestNewPublishPermissions(reauthRequest);
    }
}

private void handleAnnounce() {
    Session session = Session.getActiveSession();
    if (session == null || !session.isOpened()) {
        return;
    }

    List<String> permissions = session.getPermissions();
    if (!permissions.containsAll(PERMISSIONS)) {
        requestPublishPermissions(session);
        return;
    }
}
  • 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-19T04:21:55+00:00Added an answer on June 19, 2026 at 4:21 am

    Your code seems to be fine, it’s an API’s bug recently reported:

    https://developers.facebook.com/bugs/268146283318403?browse=search_51235ada57ba59615000124

    Just patience, I’ve got the very same error and all we can do is wait for a fixed API.

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

Sidebar

Related Questions

In my Spring web flow app, one of my action-state transitions looks like this:
i have this grails webflow def currencyDescriptionFlow = { start { action { flow.messageCommand
My program flow is like this: I need to sequential processing per user's request
I'm working on an app that will download a zip file stored on Amazon
The flow of the program is like this : Image from 1st set of
in the flow: <action-state id=create> <evaluate expression=operatore_rer result=flowScope.operatore_rer /> <evaluate expression=mainService.getComuni() result=flowScope.comuni_list /> <transition
this program can detect http flow and etc.... but it ignores XMPP flow ;
My setup is like this. <div id=header> <div id=heading>Title</div> <div id=flow> Enter Something: <input
I'm trying to implement a SWF action like this: @Component(value = initializeProjectsTestingFormAction) public class
I have a page start.jsf which points to an action #{ruler.start}, this action forwards

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.