Resource icon

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

No permission to download
In some posts, users don't insert attachment images to post content. So could you also handle this case?

Do you mean situations when users upload an image but they don't actually insert the image into the post message?
 

Well, I would have to take a second look at the code since at first glance, it would require me to create an additional query and that is not the purpose of this addon. I will check it right away and will report back with my findings.
 
I have installed but it is not work while the first og:image tag is still the author avatar. Do you have any suggestion because when I like the link, Facebook chose the first og:image as the article image.

Page link http://forum.movsa.org.au/threads/gioi-thieu-ve-movsa.67/
Code:
<meta property="og:image" content="http://forum.movsa.org.au/data/avatars/m/0/108.jpg?1381669565" />
    <meta property="og:image" content="http://www.movsa.org.au/images/movsa/Vietnamese%20Traditional%20Costume%20Day%202012.jpg" />
 
I installed this addon but it continues to pull the avatar of the post creator. Any ideas?
 
Same problem. The 'og image' section in Facebook tools shows both author image and the attachment; and shows the first image (that is avatar) in shared posts.

How do we fix this?
 
I'm having the same issue. Simply doesn't work -> uninstall
 
Has anyone found a workaround to this? Is it better to just hand code the opengraph into your site? And if you hand code it where should it be placed?
 
Why don't using the the public thumbnail image url? in this way it will work with guests too!
 
I too desperately want a fix for this problem.
I modified the template modification simply reversing the order of the two og:image.
My opengraphimage_template now result like this:

Code:
<xen:if is="{$xenOptions.facebookAppId} OR {$xenOptions.facebookAdmins}">
    <meta property="og:site_name" content="{$xenOptions.boardTitle}" />
-   <xen:if is="{$avatar}"><meta property="og:image" content="{$avatar}" /></xen:if>
+   <meta property="og:image" content="<xen:callback class="OpenGraphImage_Callback" method="getImage" params="">{xen:helper fullurl, {xen:property ogLogoPath}, 1}</xen:callback>" />
+    <meta property="og:image" content="{xen:helper fullurl, {xen:property ogLogoPath}, 1}" />
+  <xen:if is="{$avatar}"><meta property="og:image" content="{$avatar}" /></xen:if>
    <meta property="og:type" content="{xen:if $ogType, $ogType, article}" />
    <meta property="og:url" content="{xen:raw $url}" />
    <meta property="og:title" content="{xen:raw $title}" />
    <xen:if is="{$description}"><meta property="og:description" content="{xen:raw $description}" /></xen:if>
    {xen:raw $ogExtraHtml}
    <xen:if is="{$xenOptions.facebookAppId}"><meta property="fb:app_id" content="{$xenOptions.facebookAppId}" /></xen:if>
    <xen:if is="{$xenOptions.facebookAdmins}"><meta property="fb:admins" content="{xen:helper implode, {$xenOptions.facebookAdmins}, ','}" /></xen:if>
</xen:if>


Find:
Code:
<xen:if is="{$avatar}"><meta property="og:image" content="{$avatar}" /></xen:if>
    <meta property="og:image" content="{xen:helper fullurl, @ogLogoPath, 1}" />

Replace with this:

Code:
<meta property="og:image" content="<xen:callback class="OpenGraphImage_Callback" method="getImage" params="">{xen:helper fullurl, @ogLogoPath, 1}</xen:callback>" />
    <meta property="og:image" content="{xen:helper fullurl, @ogLogoPath, 1}" />
    <xen:if is="{$avatar}"><meta property="og:image" content="{$avatar}" /></xen:if>
 
Back
Top Bottom