Note that there are some explanatory texts on larger screens.

plurals
  1. POFACEBOOK O-AUTH dialog opening on load automatically
    primarykey
    data
    text
    <p>i have a login page where i will give link for facebook login but unfortunately the facebook oauth dialog opens up as soon as i land on the the login page .I want it on click of the link and not on page load.Can any help? </p> <pre><code>&lt;p&gt;&lt;a onclick='login(); return false;'&gt;Login&lt;/a&gt;&lt;/p&gt; &lt;script&gt; // Additional JS functions here window.fbAsyncInit = function() { FB.init({ appId : '3423243443', // App ID status: true, // check login status cookie: true, // enable cookies to allow server to access session, xfbml: true, // enable XFBML and social plugins oauth: true // enable OAuth 2.0 // channelUrl: 'http://www.yourdomain.com/channel.html' //custom channel }); FB.getLoginStatus(function(response) { if (response.status === 'connected') { // connected alert("connected1"+response.authResponse.expiresIn); } else if (response.status === 'not_authorized') { // not_authorized login(); } else { // not_logged_in alert("not logged in"); login(); } },true); }; (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)); /*function login() { FB.login(function(response) { if (response.authResponse) { testAPI(response) // connected alert("connected2 "+response.authResponse); } else { // cancelled alert("cancelled"); alert("cancelled"+response.authResponse); } }); } ; function testAPI() { console.log('Welcome! Fetching your information.... '); FB.api('/me', function(response) { console.log('Good to see you, ' + response.email + '.'); }); } ;*/ &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload