Guest User

Krpano facebook publish hack

a guest
Oct 4th, 2011
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. Add this in the very beginning of swfkrpano_inline-js-singleswf.html and change .html to .php:
  2.  
  3. <?php
  4. $domain = ('http://iampear.com');
  5. $url = dirname($_SERVER['PHP_SELF']) . '/'; // Gets the current folder path
  6. $file = pathinfo(__FILE__, PATHINFO_FILENAME); // Gets the current filename without extension
  7. $fb = ('_fb.jpg'); // the name suffix for the facebook preview image
  8. ?>
  9.  
  10.  
  11. Then add this anywhere inside the <head></head>:
  12.  
  13. <meta property="fb:page_id" content="your_fb_ID" />
  14. <meta property="og:title" content="Your Title as shown on facebook" />
  15. <meta property="og:type" content="article" />
  16. <meta property="og:image" content="<?php echo $domain . $url . $file . $fb;?>" />
  17. <meta property="og:url" content="<?php echo $domain ?>" />
  18. <meta property="og:video" content="<?php echo $domain . $url . $file .'.swf';?>" />
  19. <meta property="og:video:type" content="application/x-shockwave-flash" />
  20. <meta property="og:video:width" content="398" />
  21. <meta property="og:video:height" content="460" />
  22.  
Add Comment
Please, Sign In to add comment