1
Zap_English
Publisher Images on Facebook

XOOPS Version XOOPS 2.5.9-Beta2
PHP Version 7.0.33
mySQL Version 5.5.65-MariaDB
Publisher 1.02 beta 3

I noticed that when I share to FB the shareaholic popup shows the image attached to the publisher article

but when it's posted to FB it just shows our main logo with a description beside it.

And it's only on one website. two others work fine

2
liomj
Re: Publisher Images on Facebook
  • 2020/6/13 12:45

  • liomj

  • Just popping in

  • Posts: 67

  • Since: 2012/4/10


Hi
you can try inserting this code in root/themes/themename/theme.html before </head> if that helps

<{if $xoops_dirname == "publisher"}>  
        <
meta property="og:type" content="website" />
        <
meta property="og:title" content="<{$item.title}>" />
        <
meta property="og:description" content="<{$item.summary}>" />
        <
link rel="image_src" href="<{$item.image_path}>" />  
        <
meta property="og:image" content="<{$item.image_path}>"/> 
        <
meta property="og:image:type" content="image/jpeg" />
        <
meta property="og:image:width" content="1200" />
        <
meta property="og:image:height" content="628" />
        <
meta property="og:url" content="<{$item.itemurl}>"/>  
        <
meta itemprop="image" content="<{$item.image_path}>"/>  
        <
link rel="canonical" href="<{$item.itemurl}>"/>   
    <{/if}>

3
heyula
Re: Publisher Images on Facebook
  • 2020/6/13 13:54

  • heyula

  • Theme Designer

  • Posts: 560

  • Since: 2008/4/24


Schema example for TDMDownloads

Resized Image


Demo: https://indir.top/
Resized Image

4
heyula
Re: Publisher Images on Facebook
  • 2020/6/13 13:59

  • heyula

  • Theme Designer

  • Posts: 560

  • Since: 2008/4/24


other examples
<{if $smarty.server.REQUEST_URI|strstr:'indir/singlefile.php'}> 
        <{* 
adding social meta tagsFacebook *}>
        <
meta property="og:url" content="<{$xoops_url}>/indir/singlefile.php?lid=<{$lid}>"/>
        <
meta property="og:title" content="<{$xoops_pagetitle}>"/>
        <
meta property="og:description" content="<{$xoops_meta_description}>"/>
        <
meta property="og:type" content="article"/>
        <
meta property="og:image" content="<{$logourl}>"/>  
        
        <{* 
adding social meta tagsTwitter *}>
        <
meta name="twitter:url" content="<{$xoops_url}>/indir/singlefile.php?lid=<{$lid}>"/>
        <
meta name="twitter:card" content="summary"/>
        <
meta name="twitter:title" content="<{$xoops_pagetitle}>"/>
        <
meta name="twitter:description" content="<{$xoops_meta_description}>"/>
        <
meta name="twitter:image" content="<{$logourl}>"/>
        <{/if}>
        
        <{if 
$SCRIPT_NAME == "/index.php"}>
        <{* 
adding social meta tagsFacebook *}>
        <
meta property="og:url" content="https://indir.top/"/>
        <
meta property="og:title" content="<{$xoops_pagetitle}>"/>
        <
meta property="og:description" content="<{$xoops_meta_description}>"/>
        <
meta property="og:type" content="article"/>
        <
meta property="og:image" content="https://indir.top//themes/indir/images/logo.png"/>  
        
        <{* 
adding social meta tagsTwitter *}>
        <
meta name="twitter:url" content="https://indir.top/"/>
        <
meta name="twitter:card" content="summary"/>
        <
meta name="twitter:title" content="<{$xoops_pagetitle}>"/>
        <
meta name="twitter:description" content="<{$xoops_meta_description}>"/>
        <
meta name="twitter:image" content="https://indir.top//themes/indir/images/logo.png"/>
        
        <
meta name="rating" content="<{$xoops_meta_rating}>"/>
        <
meta name="author" content="<{$xoops_meta_author}>"/>
        <
meta name="copyright" content="<{$xoops_meta_copyright}>"/>
        <
meta name="generator" content="XOOPS"/>
        <{/if}>

5
Mamba
Re: Publisher Images on Facebook
  • 2020/6/13 14:30

  • Mamba

  • Moderator

  • Posts: 11245

  • Since: 2004/4/23


You need to check out what are the differences between those installations.

We use here Publisher 1.07 Final, and we don't have any problems - every time when I post a link to an article here, Facebook is fetching the picture from here without any problem.

Because two websites are working fine, then obviously something has to be different on the third one...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

6
Zap_English
Re: Publisher Images on Facebook

the one that isn't working is a newer site.

I pretty sure I had to add some code to the other two to gt FB to accept/display the proper image, but I don't remember what. I was a few years ago

7
Zap_English
Re: Publisher Images on Facebook

[quote]
liomj wrote:
Hi
you can try inserting this code in root/themes/themename/theme.html before </head> if that helps


Unfortunately that code didn't do anything

Login

Username:
Password:

Lost Password? Register now!

Who's Online

72 user(s) are online (41 user(s) are browsing Support Forums)


Members: 0


Guests: 72


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits