facebookWallPost.jade 955 B

12345678910111213141516171819202122232425
  1. a(onclick='postToFeed(); return false;').facebook Post on Facebook
  2. script(src='http://connect.facebook.net/en_US/all.js')
  3. script(type='text/javascript')
  4. FB.init({appId: "148710621956179", status: true, cookie: true});
  5. function postToFeed() {
  6. // calling the API ...
  7. var obj = {
  8. method: 'feed',
  9. redirect_uri: 'https://www.sharelatex.com',
  10. link: '#{buildReferalUrl()}',
  11. picture: 'https://www.sharelatex.com/brand/logo/logosmall.png',
  12. name: 'ShareLaTeX - Online LaTeX Editor',
  13. caption: 'Free Unlimited Projects and Compiles',
  14. description: 'ShareLaTeX is a free Online LaTeX Editor. Real time collaboration like Google Docs, with Dropbox, history and Auto Complete'
  15. };
  16. //function callback(response) {
  17. // document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
  18. //}
  19. FB.ui(obj, callback);
  20. }