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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:30:53+00:00 2026-05-30T22:30:53+00:00

to connect to facebook, i’ve placed this in body tag: <body> <div id=fb-root></div> <script>

  • 0

to connect to facebook, i’ve placed this in body tag:

<body>
      <div id="fb-root"></div>
      <script>
        window.fbAsyncInit = function() {
          FB.init({
            appId      : 'xxxxxxx',
            status     : true, 
            cookie     : true,
            xfbml      : true,
            oauth      : true,
          });
        };
        (function(d){
           var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
           js = d.createElement('script'); js.id = id; js.async = true;
           js.src = "//connect.facebook.net/en_US/all.js";
           d.getElementsByTagName('head')[0].appendChild(js);
         }(document));
      </script>
      <div class="fb-login-button">Login with Facebook</div>
    </body>

The only problem i’m having is how to know that the user has login or not??

  • 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-30T22:30:54+00:00Added an answer on May 30, 2026 at 10:30 pm
    function login() {
    
            FB.login(function(response) {
                if (response.authResponse) {
                    alert('Success!');
                }else{
                    alert('Login Failed!');
                }
            }, {scope: 'email'});
         }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

at the minute I have this: <div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js></script> <script> window.fbAsyncInit = function()
Currently, I'm using <div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js></script> <script> FB.init({ appId: '214620658601362', cookie: true, status:
I use this Facebook Login Button code: <div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js></script> <script> FB.init({ appId
I am getting this error after doing this code: <div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js></script> <script>
To get the facebook comment count, I'm doing this: <div id=fb-root> </div> <script src=http://connect.facebook.net/en_US/all.js#appId=555555&amp;xfbml=1>
I seem to notice that Facebook's JS <div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js#appId=APP_ID&amp;xfbml=1></script> seems to affect
I have this code to log people in with Facebook: <div id=fb-root></div><script src=http://connect.facebook.net/en_US/all.js#appId=my_app_id&amp;xfbml=1> </script><fb:login-button
I'm using the default Facebook embed code: <div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js#appId=176702405718664&amp;xfbml=1> </script> <fb:like href=http://domain.com
$(body).append( <p id='Zoom'>Send to: <b> + full + </b> <div id='fb-root'></div><script src='http://connect.facebook.net/en_US/all.js#xfbml=1'></script><fb:send href=' +
I am using the facebook comment plugin on my site. <div id=fb-root></div><script src=http://connect.facebook.net/en_US/all.js#xfbml=1></script><fb:comments style=background-color:#131514;

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.