Include a script to let a person log into your app. It should automatically open the Login Dialog when someone first uses your app. Place the code right after the FB.init call. // Place following code after FB.init call. function onLogin(response) { if (response.status == 'connected') { FB.api('/me?fields=first_name', function(data) { var welcomeBlock = document.getElementById('fb-welcome'); welcomeBlock.innerHTML = 'Hello, ' + data.first_name + '!'; }); } } FB.getLoginStatus(function(response) { // Check login status on load, and if the user is // already logged in, go directly to the welcome message. if (response.status == 'connected') { onLogin(response); } else { // Otherwise, show Login dialog first. FB.login(function(response) { onLogin(response); }, {scope: 'user_friends, email'}); } });

Wednesday, 30 July 2014

Hello there

This is a fansite dedicate to lovers! Yoohoo come and share it with your friends :)

No comments:

Post a Comment