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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:25:02+00:00 2026-05-28T16:25:02+00:00

I am just getting started with the Facebook JavaScript SDK, all I want to

  • 0

I am just getting started with the Facebook JavaScript SDK, all I want to do is enable users to log in to my web site with their FB account. First I put in the <div class="fb-login-button">Login with Facebook</div> and the boilerplate just like it says in the Facebook for Websites documentation at developers.facebook.com/docs/guides/web/#login

I click the FB login button, get the popup, click Allow…and nothing happens. I can’t find any cookie like fbsr_APPID anywhere (e.g. Request.Cookies("fbsr_MYAPPID") turns up nothing) and the page didn’t redirect to the Site URL I specified in the App’s settings. I put some more JavaScript in to debug, and literally get nothing.

window.fbAsyncInit = function () {
    FB.init(
{
    appId: 'MYAPPID',
    channelUrl: http://bla,
    status: true,
    cookie: true,
    xfbml: true,
    oauth: true
});
    // Additional initialization code here
    alert("Please just prove this init code is running at all!!!!");

    FB.Event.subscribe('auth.login', function (response) {
        alert('Logged in: ' + response);
    }
    );

    FB.getLoginStatus(function (response) {
        alert('Check login: ' + response);
        if (response.authResponse) {
            var access_token = response.authResponse.accessToken;
            alert('Access token yay! ' + access_token);
        }
    });
};

None of the alerts show up or anything, leading me to think the whole script is failing to run.

I switched from that facebook button to the server-side authentication link described at developers.facebook.com/docs/authentication, and this time the redirect definitely happens and I get a code= in the query parameters, but I get the same [lack of] results running any FB.JavaScript methods, in Init or as an event handler. I still can’t find a facebook cookie (tho maybe the server-side method never produces one?) but I figure with an Ajax call or something I’ll be able to use the code to get the access_token (it’d be nice if FB’s documentation gave some hints on how to use that code, but that’s another issue).

Even if I ditch Facebook’s JavaScript SDK as much as possible and rely on server-side scripting, I ought to be able to at least use FB.getLoginStatus. What could I be doing wrong?

  • 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-28T16:25:03+00:00Added an answer on May 28, 2026 at 4:25 pm

    I’ve narrowed your problem down to this line

    channelUrl: http://bla,

    It should read (of course with a real url to your channel file:

    channelUrl: 'http://bla',

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

Sidebar

Related Questions

I am just getting started with the facebook sdk sample projects. Whenever I try
I am just getting started with ASP.Net MVC 3 with the Facebook C# SDK.
Just getting started using MVC in ASP.NET, I'm going to have it so users
I am just getting started with flex and am using the SDK (not Flex
I'm just getting started using Facebook's OAuth for my website... when Login with Facebook
Just getting started with Dojo. I want to pass a couple of custom parameters
I'm just getting started with subversion. I have web applications which I need to
I'm just getting started learning how to use Subversion for building my web applications,
I am just getting started on javascript, and I have experience in developing systems
Just getting started with backbone, and I thought I was familiar with all the

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.