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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:05:16+00:00 2026-05-26T21:05:16+00:00

Users have been able to log into my website using their Facebook account, but

  • 0

Users have been able to log into my website using their Facebook account, but then it suddenly stopped working properly.

I use the following standard Facebook JavaScript SDK code:

window.fbAsyncInit = function() {
  FB.init({
    appId      : '<MY_APP_ID>',
    status     : true, // check login status immediately
    cookie     : true, // enable cookies to allow the server to access the session
    xfbml      : false // because I don't use XFBML
  });
  FB.login(function(response) {
    // code that deals with `response`, whether null or not
  });
}

But if I cleared the browser cache, and triggered this code (after the Facebook library had loaded), the following would happen:

  1. Facebook’s login dialog would pop up.
  2. After entering credentials of a user that has access to this Facebook app, a dialog would ask whether I want to register a new login location.
  3. Regardless of the action taken in the previous step, the dialog box displays the following error message:

An error may have occurred as part of the login process. You can close this window and try returning to the application, though it may ask you to log in again. This is probably due to a bug in the application.

FB.login’s response contains an error message. Inspecting the browser’s state, I can see that login information is stored within a Facebook cookie. Triggering the above code again, without clearing the cache, now succeeds.

Why doesn’t it work the first time around?

  • 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-26T21:05:17+00:00Added an answer on May 26, 2026 at 9:05 pm

    Due to Facebook’s OAuth 2.0 and HTTPS Migration, not using OAuth 2.0 after October 1, 2011 within JavaScript SDK will not work (properly).

    To make the above example work, make sure that:

    • your FB.init call sets oauth to true (see example usage):
    • in the code that deals with the response:
      • you are reading the authResponse (not session) field of the FB.login’s response;
      • you are calling FB.getAuthResponse (not FB.getSession), and reading signedRequest from its response.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using a noscript tag to show a warning when users have
I have been able to Archive on Xcode 4 successfully, but all of a
Hi guys I have a simple membership based website where users log in and
I've been using the old v3.0 C# SDK for some time and Facebook have
Using the advice in this post I have been able to access the spotify
If two users edit the same wiki topic, what methods have been used in
All Gmail users should have already noticed that file upload progress bar has been
There have been a few questions like this around the place but none have
New to Tsung and Erlan and have run into an issue I haven't been
I have a site that uses a solr search engine, but I've only been

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.