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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:54:49+00:00 2026-05-25T20:54:49+00:00

I have a difficult problem. Difficult means I searched through the net and StackOverflow

  • 0

I have a difficult problem. Difficult means I searched through the net and StackOverflow as well the whole FBJS SDK documentation and haven’t find answer.

I am building a Page Tab application where I’d like to let fans to rsvp events. So I have to check if the user is logged in and if it doesn’t I have to login. That sounds pretty easy, but FB.getLoginStatus doesn’t fires callback function. This is the code excerpt:

FB.init({
   appId: window.appID,
   status: true,
   xfbml: true,
   cookie: true,
   oauth: true,
   channelUrl: 'http://example.com/fb/channel.html'
 }); 

and then I simply – of course after the user clicks on a button – call FB.getLoginStatus, but it seems it doesn’t do anything.

I’ve already checked sandbox mode, FB.init success, URLs in application settings and developing environment. I can call FB.ui, although FB.ui with method: ‘oauth’ I get an error message saying ” The “redirect_uri” parameter cannot be used in conjunction with the “next” parameter, which is deprecated.”. Which is very weird because I didn’t used “next” parameter. But when I set next to undefined, it works fine, I get the window, but it says “Given URL is not allowed by the Application configuration.”. Expect from that, I can login, then I’ve got the access_token. But in the new window, getLoginStatus still doesn’t do anything.

So any advices are welcome.

Thanks,
Tamas

UPDATE:

function onBodyLoad() { //on body onload
    FB.init({
     appId: window.appID,
     status: true,
     xfbml: true,
     cookie: true,
     oauth: true,
     channelUrl: 'http://example.com/fb/channel.html'
    });     
   }
...
function getName() { // on button onclick
 FB.getLoginStatus(function(response){
  if (response.authResponse)
   {
    window.loggedIn = true;
    debugString('Logged in');
   } else
   {
    window.loggedIn=false; 
    debugString('Not logged in');
   }
}, true);
if (window.loggedIn === undefined)   {
     debugString('getLoginStatus did not exec'); // I always get this message
  }

}

UPDATE 2: I created a new App on a different URL, which is configured as a standalone website. There these codes work perfectly, I can getLoginStatus, I can login, etc. Is there any difference working in the context of FB, and in a standalone website, using FB JavaScript SDK?

  • 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-25T20:54:49+00:00Added an answer on May 25, 2026 at 8:54 pm

    FB.getLoginStatus does not fire the callback when you are running the website on a different domain than the one that you registered the app with. I usually find myself in this situation when I am developing locally or on a staging server.

    For example, if you registered the site with example.com and your staging server is example.mystagingserver.com, the callback wont fire. In this case, you need to create a second application in Facebook and use the Application ID and Secret for the new app.

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

Sidebar

Related Questions

I have run into a common, yet difficult problem. I do not use Photoshop
I am currently faced with a difficult sorting problem. I have a collection of
I am new to Lucene.NET and have already run into a (I think) difficult
Well it's pretty difficult to explain my problem. I'm currently developing a toolbar for
I have been trying to tackle this problem , but I am having difficulty
I have an oddly difficult task to perform. I thought it would be easy,
Ever since I gained experience at a software house I have found it difficult
I'm recently new in MVC technology and i'm with a difficult I have a
We have a large MS Access project that requires GUI functionality that is difficult
I'm not sure how difficult this but I have an array and would like

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.