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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:12:11+00:00 2026-06-03T06:12:11+00:00

Here is my code: <!DOCTYPE html> <html xmlns:fb=https://www.facebook.com/2008/fbml> <head> <meta http-equiv=Content-Type content=text/html; charset=UTF-8/> <title>New

  • 0

Here is my code:

<!DOCTYPE html>
<html xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>New JavaScript SDK & OAuth 2.0 based FBConnect Tutorial |     
Thinkdiff.net</title>
</head>

<body>

<div id="fb-root"></div>

<script>

  window.fbAsyncInit = function() {
  FB.init({
  appId      : '154062364721089', // App ID
  channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
  status     : true, // check login status
  cookie     : true, // enable cookies to allow the server to access the session
  xfbml      : true,  // parse XFBML
  oauth: true
  });

  // Additional initialization code here

   alert('Api loaded');

   FB.login(function(response)
   {
    console.log(response);
   });

   };

  // Load the SDK Asynchronously
 (function(d){
 var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
 if (d.getElementById(id)) {return;}
 js = d.createElement('script'); js.id = id; js.async = true;
 js.src = "connect.facebook.net/en_US/all.js";
 ref.parentNode.insertBefore(js, ref);
 }(document));

</script>

test

</body>
</html>

But when I open this file in the browser the Facebook api does not load. I just see “test” printed on the screen. I believe the browser should be contacting facebook to load the api – this I think will be known as a connecting message at the bottom of the browser, which is not happening.

  • 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-03T06:12:12+00:00Added an answer on June 3, 2026 at 6:12 am

    It sounds like you’re expecting Facebook to automatically prompt the user to connect/allow/login to the App. To do this, you need to add the following after fb api initialization (code goes after // Additional initialization code here)…

    // Additional initialization code here
    
    alert('Api loaded');
    
    FB.login(function(response)
    {
        console.log(response);
    });
    

    Edit: Also, try removing the <script> reference and use the async code from the facebook documentation – https://developers.facebook.com/docs/reference/javascript/

      (function(d){
         var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
         if (d.getElementById(id)) {return;}
         js = d.createElement('script'); js.id = id; js.async = true;
         js.src = "//connect.facebook.net/en_US/all.js";
         ref.parentNode.insertBefore(js, ref);
       }(document));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml>
First off here is the code! <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
I want to do like this : http://ajaxload.info/ here is my code: <!DOCTYPE html>
I'm seeing my Friend's code here... <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN> <HTML>
Here's a contrived example of my code: <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
In this google map sample: http://code.google.com/apis/maps/documentation/javascript/examples/streetview-simple.html If the user dropped the little guy far
In this google map sample: http://code.google.com/apis/maps/documentation/javascript/examples/streetview-simple.html If the user dropped the little guy far
Currently I was trying the jquery,css dropdown which is from here. http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx I added
I can't get my dojo working. I've tried everything. Here is the code: <!DOCTYPE
I am trying to use the fancybox system described here: http://fearlessflyer.com/2011/01/create-an-awesome-photo-gallery-with-fancybox-and-timthumb/ I can get

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.