Hi,
Just started using krpano a couple of days ago and I found the great guide by Patrick Cheatham on how to post your panoramas on facebook: http://patrickcheatham.com/posting-360-de…mas-to-facebook
I wanted to automate this process and did the following for single-swf-pano:
1. Changed the extension name of swfkrpano_inline-js-singleswf.html (in templates/html/) to .php, then added this in the very beginning of it:
<?php
$domain = ('http://yourwebsite.com'); // your website
$url = dirname($_SERVER['PHP_SELF']) . '/'; // Gets the current folder path
$file = pathinfo(__FILE__, PATHINFO_FILENAME); // Gets the current filename without extension
$fb = ('_preview.jpg'); // the name suffix for the facebook preview image
?>
2. Then add this anywhere inside the <head></head> and change to your facebook ID:
<meta property="fb:page_id" content="your_fb_ID" />
<meta property="og:title" content="[NAME]" />
<meta property="og:type" content="article" />
<meta property="og:image" content="<?php echo $domain . $url . $file . $fb;?>" />
<meta property="og:url" content="<?php echo $domain ?>" />
<meta property="og:video" content="<?php echo $domain . $url . $file .'.swf';?>" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
<meta property="og:video:width" content="398" />
<meta property="og:video:height" content="460" />
3. Change the extension from .html to .php on the following rows in either singleswf.config, singleswfmultires.config or singleswftiled.config depending on which droplet your using. Should look like this:
4. Now when you drag your panorama picture to any of the single-swf droplets and upload the files to your server, you will get a yourpanorama.php that you can link to on facebook and it will automatically show a thumbnail with a play button which can be clicked and viewed right inside facebook. Just remember to create a preview image with the same name as your swf but add the suffix “_preview.jpg”.
DONE!
EXTRA: If you want to make a yourpanorama_preview.jpg easier you can actually make a copy of "MAKE PREVIEW (CUBESTRIP) droplet.bat" and edit this row:
:SPHEREINPUT
FOR %%V in (%*) do "%~dp0\kmakepreview" -cs -smooth=25 "%%~V"
into this:
:SPHEREINPUT
FOR %%V in (%*) do "%~dp0\kmakepreview" -smooth=0 "%%~V"
This will produce a sharp yourpanorama_preview.jpg that facebook will use as thumbnail (it will be smaller off course).
I Hope someone finds this useful, at least I do :D