Forum

Screenshot for Facebook post

07 September 2016 10:26 #11650
I would like to share in Facebook some stuff I made with Blend4Web.

Currently it shows just a link and no image which is not attractive.
An option to add an image to Blend4Web output in Facebook readable form would be nice.
07 September 2016 16:16 #11663
Hi Nils,

This can be done if you add something like this

<meta property="og:image" content="http://mysite.com/my_image.jpg"/>

in your HTML file.
Development Lead | Twitter
08 September 2016 09:53 #11677
Thanks!

It worked when I replaced corresponding line in webplayer.html
http://kodu.ut.ee/~nils/source/hubble/webplayer.html?load=hubble_final.json&no_social

I also tried iframe version to keep the url simpler.
http://kodu.ut.ee/~nils/source/hubble/hubble.html
This way the image does not appear in FB post.
Is there a way in this case without actually putting visible image into my hubble.html?
08 September 2016 12:20 #11683
In the second version you used
<head/><meta property="og:image" content="http://kodu.ut.ee/~nils/source/hubble/screenshot.jpg"/>

This effectively puts this meta tag outside the head of the HTML document.
Try something like this:
<head>
<meta property="og:image" content="http://kodu.ut.ee/~nils/source/hubble/screenshot.jpg"/>
</head>
Development Lead | Twitter
 
Please register or log in to leave a reply.