Jump to content

topic share not show or detect first img on topic


Recommended Posts

hai. 

i like to ask about topic share (telegram facebook and twitter)

when i share my topic to facebook, telegram and twitter. no image was show image on my first image on topic. in facebook it will show forum logo only... 

is that any way to show my random or first image on my topic when i share 

thanks

Link to comment
Share on other sites

On 1/17/2021 at 3:25 AM, OMGTECH said:

hai. 

i like to ask about topic share (telegram facebook and twitter)

when i share my topic to facebook, telegram and twitter. no image was show image on my first image on topic. in facebook it will show forum logo only... 

is that any way to show my random or first image on my topic when i share 

thanks

Insert into postContainer template.

{{if !isset(\IPS\Output::i()->metaTags['og:image'])}}
	{{preg_match('~<img[^>]*?src="([^"]*)"[^>]*>~i', $comment->content(), $matches); }}
	{{if isset($matches[1])}}
		{{\IPS\Output::i()->metaTags['og:image'] = $matches[1];}}
	{{endif}}
{{endif}}

 

Took on ipbskins.ru, works great.

Link to comment
Share on other sites

On 1/20/2021 at 6:59 PM, leonovich_J said:

Insert into postContainer template.


{{if !isset(\IPS\Output::i()->metaTags['og:image'])}}
	{{preg_match('~<img[^>]*?src="([^"]*)"[^>]*>~i', $comment->content(), $matches); }}
	{{if isset($matches[1])}}
		{{\IPS\Output::i()->metaTags['og:image'] = $matches[1];}}
	{{endif}}
{{endif}}

 

Took on ipbskins.ru, works great.

so i can put any where in postContainer ??

Link to comment
Share on other sites

  • 1 month later...
On 1/25/2021 at 3:22 AM, leonovich_J said:

Yes

still problem with facebook share.. 

og image its detect but the image not show... 

check here https://developers.facebook.com/tools/debug/

and got this error 

1.thumb.png.79e99c7e4dd0b30439f74314e49e1198.png

Quote

Use og:image:width and og:image:height Open Graph tags to specify the image dimensions to the crawler so that it can render the image immediately without having to asynchronously download and process it.

how can i set the og image width and height ?

after 30 minutes i scrape again fb debug got this error 

2.thumb.png.648c85a1b39d0ac7070ba70aee84ee1e.png

Edited by OMGTECH
Link to comment
Share on other sites

9 hours ago, OMGTECH said:

still problem with facebook share.. 

og image its detect but the image not show... 

check here https://developers.facebook.com/tools/debug/

and got this error 

1.thumb.png.79e99c7e4dd0b30439f74314e49e1198.png

how can i set the og image width and height ?

after 30 minutes i scrape again fb debug got this error 

2.thumb.png.648c85a1b39d0ac7070ba70aee84ee1e.png

I would submit a ticket - it looks like the image URL hasn't been "parsed" to set the correct base of the URL correctly. We'll need to take a look to determine why that is.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...