thumbnail on Facebook etc.

Forum for all users to discuss the implementation and operation of the ChoralWiki at CPDL
Locked
bobnotts
Site Admin
Posts: 982
Joined: 11 Mar 2006 19:05
Location: UK

thumbnail on Facebook etc.

Post by bobnotts »

Evening all. Is there any scope to alter the thumbnail for Facebook and the like? (See attached)
Attachments
Screenshot_2013-08-06-21-26-56.png
Rob Nottingham
CPDL Administrator
choralia
Site Admin
Posts: 2926
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: thumbnail on Facebook etc.

Post by choralia »

I don't use Facebook, however I googled a little bit and found (see this link for example) that, when posting a link, Facebook should normally propose multiple options (Auto-Detected by Facebook; Auto-Detected from Item Content; Manual; Disabled) to select the most appropriate thumbnail associated to the link. So, I think that you should use such features to select the most appropriate thumbnail (e.g., the CPDL logo).

On our side we may possibly help the auto-detection process by adding some Metadata to the html header of all wiki pages, so that auto-detection will most likely select our preferred thumbnail. I think that this can be configured somehow using MediaWiki extensions or something like that, but I'm not sure.

Max
bobnotts
Site Admin
Posts: 982
Joined: 11 Mar 2006 19:05
Location: UK

Re: thumbnail on Facebook etc.

Post by bobnotts »

Thanks for investigating, Max. In this case, because I posted the link from a mobile device, I didn't get to choose the thumbnail that Facebook displays for the link, though I understand this is possible when using the site from a desktop. I believe we can put something in our website code to request that Facebook and other sites use a particular thumbnail so if we can set that to our logo, that'd be great, though I'm afraid I've no idea how!
Rob Nottingham
CPDL Administrator
carlos
Site Admin
Posts: 1870
Joined: 19 Aug 2008 15:26
Location: São Paulo, Brasil

Re: thumbnail on Facebook etc.

Post by carlos »

Rob, I added yesterday a hidden logo inside one of the left menu boxes, to see if it would be found by facebook, but unfortunately that didn't happen. I'm going to change the image to 1x1 pixel size (but this time visible) and see what happens (will have to wait until tomorrow, so that the changes are mirrored).
bobnotts
Site Admin
Posts: 982
Joined: 11 Mar 2006 19:05
Location: UK

Re: thumbnail on Facebook etc.

Post by bobnotts »

OK, thanks Carlos
Rob Nottingham
CPDL Administrator
uptoncp
Posts: 12
Joined: 27 Feb 2013 21:05

Re: thumbnail on Facebook etc.

Post by uptoncp »

It so happens that I posted a link on Facebook about half an hour before looking at this thread; I can confirm that the NotePerfect ad is still the default selection.
carlos
Site Admin
Posts: 1870
Joined: 19 Aug 2008 15:26
Location: São Paulo, Brasil

Re: thumbnail on Facebook etc.

Post by carlos »

Yes, unfortunately the various tests realized by me didn't work out as expected and the wrong icon is still being displayed.
choralia
Site Admin
Posts: 2926
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: thumbnail on Facebook etc.

Post by choralia »

This MediaWiki extension looks interesting to possibly solve this problem.

Max
choralia
Site Admin
Posts: 2926
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: thumbnail on Facebook etc.

Post by choralia »

choralia wrote:This MediaWiki extension looks interesting to possibly solve this problem.
I changed my mind. Documentation was rather poor, and I think that it was only designed to provide page-by-page metadata, rather than to provide a default set of metadata for all pages of Choralwiki.

So, I developed a very simple extension that simply adds the same metadata to the HTML header of all pages:

Code: Select all

<meta property="og:image" content="http://www.cpdl.org/wiki/images/5/5f/Toplogo2.gif" />
The inspection of the HTML raw code of the pages as well as the Facebook debug tool seem to confirm that it works. I had to use a larger image with respect to the one uploaded by Carlos as the debug tool stated that images smaller than 200 x 200 pixels are not considered by Facebook.

Please note: the extension is currently installed on the contributor wiki only (www.cpdl.org). It will propagate to the visitor wikis (www0, www1, www2, www3) tomorrow. Furthermore, cached pages without the additional metadata may still be shown for some time. So, the effect might not be immediate.

Max
carlos
Site Admin
Posts: 1870
Joined: 19 Aug 2008 15:26
Location: São Paulo, Brasil

Re: thumbnail on Facebook etc.

Post by carlos »

Just checked and it works fine, thanks Max!

I noticed that the thumbnail was being cropped when displayed inside facebook, so I uploaded a new version in square format, 200x200, ok?
choralia
Site Admin
Posts: 2926
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: thumbnail on Facebook etc.

Post by choralia »

carlos wrote:I uploaded a new version in square format, 200x200, ok?
Yes, of course! Thank you for checking and improving, Carlos.

Max
Locked