Resource icon

Facebook OpenGraph Image from [img] or [attach] tags 1.3

No permission to download

Myke623

Active member
The version reported in Resources (here) is 1.2.0.2 but in my ACP it appears as 1.2.0.0.1. Is there something missing from the download?
 

BobbyWibowo

Well-known member
Tested on 1.5.6, seemed to be working for IMG tag at the very least. I have yet to test out attachment. But I have a suggestion, will you please modify the add-on to add a new og:image meta tag instead of replacing the default one? I'd like to at least leave the ability for users to pick the default logo when they want to. And also, I actually had modified open_graph_meta template to add og:image:type, og:image:width, and og:image:height structured properties for the default logo, but it wouldn't work as intended if the default logo got replaced with some other images instead. http://ogp.me/ documented that it's possible to have multiple og:image tags with structured properties set for certain image. But if I want to keep the custom structured properties that I added for the default logo, at the very least the add-on need to add the new og:image tag after the default og:type meta tag, or set it to specifically add the new og:image tag RIGHT BEFORE the default og:type meta tag.

UPDATE: Works fine on attachments. But I noticed some threads where it wouldn't work o_O Seems like it doesn't read attachments that weren't added to post with ATTACH tag. Oh well, the author specifically said that it will only read IMG and ATTACH tags anyway, so I guess that's alright.

UPDATE2: Figured that the add-on used Template Modifications. So, I went to modify it so that it'd add new og:image meta tag right before og:type meta tag instead. This way I can have 3 images with the logo set to have its own structural properties. Example (view the source): https://www.endlesshorizon.net/threads/alright-gather-here-those-who-are-waiting-for-deadpool.416/

As reference, here's my setting for the template modification:
Find:
HTML:
<meta property="og:type"
Replace:
HTML:
<xen:set var="$og_image_custom"><xen:callback class="OpenGraphImage_Callback" method="getImage" params=""></xen:callback></xen:set>
<xen:if is="{$og_image_custom}"><meta property="og:image" content="{$og_image_custom}" /></xen:if> <!-- adds an additional og:image meta tag if the callback returns link -->
$0
 
Last edited:

Lemminator

Well-known member
hi

i have the problem that it always showing my avatar .
i have full view of images
i have tried this :
Find:
HTML:
<meta property="og:type"
Replace:
HTML:
<xen:set var="$og_image_custom"><xen:callback class="OpenGraphImage_Callback" method="getImage" params=""></xen:callback></xen:set>
<xen:if is="{$og_image_custom}"><meta property="og:image" content="{$og_image_custom}" /></xen:if> <!-- adds an additional og:image meta tag if the callback returns link -->
$0
bit its always showing my avatar pic :(
 

BobbyWibowo

Well-known member

BobbyWibowo

Well-known member
Yeah, the default meta tag wasn't being replaced for some reason.
If you haven't applied my customization, then there had to be something wrong with the add-on. Though I doubt that my customization will help..
 

BobbyWibowo

Well-known member
I just checked your site again. I see that you've applied my customization (the HTML comment was intact). But unfortunately, the callback didn't return any image.
no_captured_link.png
Then the only reason was the add-on couldn't fetch the image from that specific thread for some reason. Though I kinda have feelings that it's related with the fact that you attached the image as a thumbnail. I'll try to check my forums to make sure.
 
Top