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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:55:40+00:00 2026-05-25T21:55:40+00:00

I am using FB.ui to authorize with application Facebook tab using simple: FB.init({ appId

  • 0

I am using FB.ui to authorize with application Facebook tab using simple:

FB.init({
  appId  : '<%= Facebook::APP_ID %>',
  status : true, // check login status
  cookie : true, // enable cookies to allow the server to access the session
  xfbml  : true,  // parse XFBML
  channelUrl  : 'http://<%= request.host_with_port %>/channel.html', // Custom Channel URL
  oauth : true //enables OAuth 2.0
});

FB.ui({
    method: 'oauth'
  },
  function(response) {
    // do some redirect stuff here
});

Authorization goes fine, but even when user confirms the application, the relevant fbsr_xxxxx cookie is not set. Is there any way to force it? Response object contains user_id, but I would rather use the standard flow with signed_request.

  • 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-25T21:55:40+00:00Added an answer on May 25, 2026 at 9:55 pm

    I’m having the exact same issue. There seems to be no way to get the access token without refreshing the page other than using FB.login, which pops out a new window.

    What you may want to do is make an ajax call to another page to return the access token after the FB.ui response:

    FB.ui({
        method: 'oauth'
      },
      function(response) {
       if(response.session){
    $.get('return_token.php', function(response){
    var access_token = response;
    alert(access_token);
    })
    }
    });
    
    
    
    
    return_token.php:
    
    <?
      $config = array(
        'appId' => $app_id,
        'secret' => $secret
      );
    
      $facebook = new Facebook($config);
    
      try {$access_token = $facebook->getAccessToken();}catch(FacebookApiException $e) {
    
            $result = $e->getResult();
            echo json_encode($result);
    
      }
    
    echo $access_token;
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that integrates with Facebook using Oauth 2. I can authorize
In my application (https://market.android.com/details?id=com.cabot.beastly&feature=search_result), I am using facebook-android api to login and share to
I'm using the facebook ios Sdk to connect my application with facebook. The login
I'm developing a new Facebook Canvas application within an iFrame and trying to authorize
On Friday I gave a demo of an MVC application using the Authorize attribute
I have an iframe Facebook application (using Facebook's new JavaScript API) that needs to
I've developed a Facebook application using the Facebook C# SDK. Interestingly, whenever the user
I'm using the following code to authorize the application and then ask for permission
I have a Facebook desktop application and am using the Graph API . I
I have a mobile application that I'm using with Facebook connect. I'm having trouble

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.