<fb:login-button scope="public_profile,email" onlogin="checkLoginState();">
</fb:login-button>
<span id="status"></span>
<script type='text/javascript'>
function statusChangeCallback(response) {
console.log('statusChangeCallback');
console.log(response);
if (response.status === 'connected') {
testAPI();
} else if (response.status === 'not_authorized') {
document.getElementById('status').innerHTML = 'Please log ' +'into this app.';
} else {
document.getElementById('status').innerHTML = 'Please log ' +'into Facebook.';
}
}
function checkLoginState() {
FB.getLoginStatus(function(response) { statusChangeCallback(response); });
}
window.fbAsyncInit = function() {
FB.init({
appId : "FB_APP_ID",
cookie : true, // enable cookies to allow the server to access // the session
xfbml : true, // parse social plugins on this page
version : 'v2.1' // use version 2.1
});
//FB.getLoginStatus(function(response) { statusChangeCallback(response); });
};
(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_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
function testAPI() {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function(response) {
console.log('Successful login for: ' + response.name);
var name = response.name;
var email = response.email;
document.getElementById('status').innerHTML = 'Thanks for logging in, ' + response.email + '!';
});
}
</script>
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Wednesday, 1 October 2014
Easy to integrate Facebook login to your web application
How to resolve auto restart in Android mobile after Factory reset on your device?
Kindly follow steps to follw,
1. First to reset your device
2. To connect internet via wireless or mobile data to configure in Gmail Account first
3. Asking To insert SIM then to insert & restart your device issue solved
1. First to reset your device
2. To connect internet via wireless or mobile data to configure in Gmail Account first
3. Asking To insert SIM then to insert & restart your device issue solved
Friday, 26 September 2014
Push method for javascript array
JavaScript Array pop() Method
var actors = ["Rajini", "Kamal", "Ajith", "Vijay"];
actors.push("Surya");
The result of fruits will be:
Rajini,Kamal,Ajith,Vijay,Surya
var actors = ["Rajini", "Kamal", "Ajith", "Vijay"];
actors.push("Surya");
The result of fruits will be:
Rajini,Kamal,Ajith,Vijay,Surya
Subscribe to:
Comments (Atom)
Feet/Inches to Meters Converter & Lbs to Kgs Converter
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
-
<?php $to = "somebody@example.com, somebodyelse@example.com"; $subject = "HTML email"; $message = " <h...
-
document.onkeydown = myKeyDownHandler; function myKeyDownHandler(event){ alert(event.keyCode) }
-
Input array= array("test"=>array("s1"=>array(),"s2"=>array())) foreach(array_keys($free_tim) as ...