• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

How to create facebook login from website which runs locally but has internet connectvity.

I want to create facebook login on localhost for the website which i run locally.
0
searchsanjaysharma
Asked:
searchsanjaysharma
  • 3
  • 3
1 Solution
 
sachinpatil10dCommented:
0
 
searchsanjaysharmaAuthor Commented:
Its giving error, how to correct it.

<!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" xmlns:fb="http://ogp.me/ns/fb#">
<head runat="server">

    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <div id="fb-root">
  <!-- you must include this div for the JS SDK to load properly -->
</div>
<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : '403156449697014', // App ID
      channelUrl : 'http://iconic.fabrics.co.uk', // Channel File
      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>
    </div>
    <div class="fb-login-button">
   
    </form>
</body>
</html>
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
searchsanjaysharmaAuthor Commented:
Thankx,

But i am getting the following error.

Given URL is not allowed by the Application configuration.
urlerrorfb.png
0
 
Manoj PatilSr. Software EngineerCommented:
OK, This error comes when you are publishing the application with local machine URL
Can you show us the setting for your facebook application which you have made..
It will be easy to all of us....
0
 
Manoj PatilSr. Software EngineerCommented:
0
 
searchsanjaysharmaAuthor Commented:
ok
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now