Not Solved [How To?] Appear thumbnail when i post to another site
#1
Not Solved
Hello to all , 

how to appear thumbnail (automatically) when i post to another site (for example fb)?


Attached Files Thumbnail(s)
   
Reply
#2
Not Solved
are you using MyBB or other forum system ? above attachment is showing other system.

anyway, there is no easy method to get image from the posted content to use for sharing.
one can simply use og:image tag in the header to send a static image (eg. site logo) to facebook
Reply
#3
Not Solved
(2020-02-18, 04:03 PM).m. Wrote: are you using MyBB or other forum system ? above attachment is showing other system.

anyway, there is no easy method to get image from the posted content to use for sharing.
one can simply use og:image tag in the header to send a static image (eg. site logo) to facebook


I just install a new fresh mybb  and doing some tests in order the new forum will work fine .
Shall I open the index.php to do this ?
Reply
#4
Not Solved
Hello,
you can add the og:image tag as .m. said - you can add it to the headerinclude template.
To do that, go into the ACP (yourforum.tld/admin in most cases), open the Themes & Templates tab, select Themes (on the left sidebar), open your theme, go into Ungrouped Templates, and open headerinclude. There, add <meta property="og:image" content="https://url-to-image.here"/> anywhere outside the <script> tags - so, for example, at the top.
Save, wait a bit for Facebook to register that it's there, and it should work.
Reply
#5
Not Solved
see also MyBB Templates guidance

content sharing plugins are also available for facebook & twitter (eg.)
Reply
#6
Not Solved
How can I make the meta property for og:image go to the attachments on the thread so I can choose one of those to post with the thread on Facebook?  Any help would be appreciated.
Reply
#7
Not Solved
I have this on my site, but I created a custom plugin to pull the image as a preview image. the bottom line is, you will need a plugin that pulls the attachment image as a variable like

{$attach['image']}

Then you have to place said variable into

<meta property="og:image" content="{$attach['image']}">

and Wholla, that is what you are looking, but now you need a plugin or come up with a way to pull attach image
Hey man, what's up?
Reply
#8
Not Solved
(2021-12-13, 08:36 PM)Michael2014 Wrote: I have this on my site, but I created a custom plugin to pull the image as a preview image. the bottom line is, you will need a plugin that pulls the attachment image as a variable like

{$attach['image']}

Then you have to place said variable into

<meta property="og:image" content="{$attach['image']}">

and Wholla, that is what you are looking, but now you need a plugin or come up with a way to pull attach image

Thank you for the insight.  I appreciate it.  I'll look into it.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)