Hambalie Posted January 17, 2021 Share 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 Link to comment Share on other sites More sharing options...
Joel R Posted January 17, 2021 Share Posted January 17, 2021 Check OG Image by @opentype Link to comment Share on other sites More sharing options...
leonovich_J Posted January 20, 2021 Share 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. Link to comment Share on other sites More sharing options...
Hambalie Posted January 24, 2021 Author Share 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 ?? Link to comment Share on other sites More sharing options...
leonovich_J Posted January 24, 2021 Share Posted January 24, 2021 7 hours ago, OMGTECH said: так что я могу поместить куда угодно в postContainer ?? Yes Link to comment Share on other sites More sharing options...
Hambalie Posted February 25, 2021 Author Share 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 Link to comment Share on other sites More sharing options...
bfarber Posted February 25, 2021 Share 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. Link to comment Share on other sites More sharing options...
Hambalie Posted February 26, 2021 Author Share 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... Link to comment Share on other sites More sharing options...
Recommended Posts