Hambalie Posted January 17, 2021 Posted January 17, 2021 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
leonovich_J Posted January 20, 2021 Posted January 20, 2021 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.
Hambalie Posted January 24, 2021 Author Posted January 24, 2021 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 ??
leonovich_J Posted January 24, 2021 Posted January 24, 2021 7 hours ago, OMGTECH said: так что я могу поместить куда угодно в postContainer ?? Yes
Hambalie Posted February 25, 2021 Author Posted February 25, 2021 (edited) 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 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 Edited February 25, 2021 by OMGTECH
bfarber Posted February 25, 2021 Posted February 25, 2021 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 how can i set the og image width and height ? after 30 minutes i scrape again fb debug got this error 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.
Hambalie Posted February 26, 2021 Author Posted February 26, 2021 16 hours ago, bfarber said: 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. ticket submit...
Recommended Posts