How to write facebook plugin, facebook SDK, please read link: http://jsfiddle.net/R5Qw7/ <! DOCTYPE html> < html xmlns = "http://www.w3.org/1999/xhtml" xmlns:fb = "http://www.facebook.com/2008/fbml" > < head > < meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" /> < title > New Graph api & Javascript Base FBConnect Tutorial | Thinkdiff.net</title> < div id = "fb-root" > </ div > < script type = "text/javascript" src = "http://connect.facebook.net/en_US/all.js" > </ script > < script type = "text/javascript" > window.fbAsyncInit = function() { ...