Welcome to WebmasterWorld Guest from 54.226.32.234

Forum Moderators: httpwebwitch & not2easy

Message Too Old, No Replies

Connect button with Facebook

     

toplisek

8:46 am on Feb 2, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I like to set Connect button inside Facebook platform.
// Load the SDK Asynchronously
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_APP_ID', // App ID
channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});

and
(function(){
var fb = document.createElement('script'); fb.async = true;
fb.src = "//connect.facebook.net/en_US/all.js";
document.getElementsByTagName('head')[0].appendChild(fb);
}());

1. Is this correct change?
2. Where is correct language folder list as I have many countries like:
en_US
3. Will xfbml: true change in the correct way top part like:
<html xmlns:fb="http://ogp.me/ns/fb#">
4. Is there need for id = 'facebook-jssdk'; if (document.getElementById(id)) {return;}js.id = id;
what will do this ID?

5. How is defined fb-root inside getElementById('fb-root')

as there is quoted:
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
document.getElementsByTagName('head')[0].appendChild(js);
}(document));

toplisek

10:51 am on Feb 21, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Is there possible to reply?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month