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

  • Home
  • SEARCH
  • 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 7755821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:39:38+00:00 2026-06-01T12:39:38+00:00

I am trying to log into facebook here is my code: <body> <form id=form1

  • 0

I am trying to log into facebook here is my code:

<body>
<form id="form1" runat="server">
    <div id="fb-root"></div>
    <script>    
        (function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=221385331301885";
            fjs.parentNode.insertBefore(js, fjs);
    } (document, 'script', 'facebook-jssdk'));
    </script> 
    <div class="fb-login-button" data-show-faces="false" data-width="300"></div>
    <script>
        window.fbAsyncInit = function () {
            FB.init({
                appId: '221385323101885', // App ID
                status: true, // check login status
                cookie: true, // enable cookies to allow the server to access the session
                xfbml: true  // parse XFBML
            });

            // Additional initialization code here
        };

        // 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>
</form>
</body>

When I run this code i get this error message:

enter image description here

I tried debugging the URL in the window using https://developers.facebook.com/tools/debug however it kept on telling me URL is not scrapable :/ The URL is below if you want to try debug it:

https://www.facebook.com/dialog/oauth?api_key=221385331301885&app_id=221385331301885&client_id=221385331301885&display=popup&domain=127.0.0.1&locale=en_GB&origin=1&redirect_uri=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df4b3e7f08%26origin%3Dhttp%253A%252F%252F127.0.0.1%253A81%252Ff22a06766%26relation%3Dopener%26transport%3Dpostmessage%26frame%3Df23609e538&response_type=token%2Csigned_request&sdk=joey

I changed my hosts file to add an entry for 127.0.0.1 localhost.local to match my Facbook App Settings. Below are screenshots of my hosts file and my facebook app settings:

Hosts File

Facbook App Settings

As you can see the domain is the same in both the hosts file and the facebook app settings. Any ideas on how i can solve this problem? thanks

  • 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-01T12:39:39+00:00Added an answer on June 1, 2026 at 12:39 pm

    I think I found your problem, but I’m not sure why it happens…

    I tried to do exactly what you did, but instead with a Mobile Web I had http://localhost in the Website option (and the mobile was empty). And everything worked fine.

    When I switched it from Website to Mobile Web I got the same error you reported.
    Do you have to use the mobile option?

    Also, you are loading the fb sdk twice, not sure why, first time with this source:

    //connect.facebook.net/en_GB/all.js#xfbml=1&appId=221385331301885

    And then again with this source:

    “//connect.facebook.net/en_US/all.js”

    What’s the point? What’s wrong with simply doing this:

    <div id="fb-root"></div>
    <div class="fb-login-button" data-show-faces="false" data-width="300"></div>
    <script>
        window.fbAsyncInit = function () {
            FB.init({
            appId: '221385323101885', // App ID
            status: true, // check login status
            cookie: true, // enable cookies to allow the server to access the session
            xfbml: true  // parse XFBML
            });
    
            // Additional initialization code here
        };
    
        // 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>
    

    Hope it will solve your problem.

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

Sidebar

Related Questions

I'm trying to create an app that multiple users would log into a server
I'm trying to log into a SQL Server database through ODBC (the DSN is
I found this snippet of code here that allows you to log into a
Somewhat inexperienced programmer here trying to write a program to log into my courses
I'm trying to write a Java program that can automatically log into Facebook. I've
In Java, I'm trying to log into an FTP server and find all the
I am trying to log some input values into an array via jquery and
I've been trying to find a python code that would log in to my
I've been trying to implement the Facebook SDK into my application in order to
I am trying to implement Facebook Connect functionality into a website that I am

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.