Sample code using JS SDK of Facebook