You have probably noticed that if you post a message to Facebook that mentions a web site, Facebook will usually come up with an image relating to the web site in question and a short piece of descriptive text. This is known as a Share Attachment.
The algorithm that Facebook uses to determine what to show is undoubtedly complex and subtle but the salient point is that the web site can instruct Facebook which image and text to use. This is done by including so-called META tags in the web page, which describe so-called Open Graph objects to Facebook. I have coded this feature into BCRA's web site, where there are now (at the time of writing) ten such share attachments, plus a default. The ten URLs that have share attachments correspond to the first ten icons on our bookshop page; that is...
- BOOKS: Cave Studies Series bcra.org.uk/cs, Dales Book Series bcra.org.uk/db, General Series bcra.org.uk/gen, Wookey Hole book bcra.org.uk/bookshop/wookey.html
- PERIODICALS: Cave & Karst Science bcra.org.uk/cks, CREG Journal bcra.org.uk/cregj, BCRA Review bcra.org.uk/rv
- OTHER ITEMS: Newsletters bcra.org.uk/news, Proceedings bcra.org.uk/proc, Speleology Archive bcra.org.uk/sp
- It makes it simpler for you to post a reference to a new issue of C&KS - just post the link and everything else is taken care of.
- The data offered to Facebook is updated automatically by our web site, so that it always supplies the latest front cover image of a C&KS issue, for example. (I dont think old share attachments are updated, though, because FB caches the data that it scrapes).
- When you post a message to Facebook (either on your own timeline or the BCRA page) you can include one of the above URLs; and Facebook will automatically select an appropriate image and text. This will usually be the cover of the latest issue in the catalogue with a related message.
- The above URLs are useful shortcuts, which I would encourage you to use. However, you can still paste the longer URLs from your web browser as they will also work.
- If you have used the above short cuts then, when a customer clicks on the share attachment, they should be taken to the 'covers' page of the catalogue (or, in some cases to a specific web page).
- If, instead, you want to force the link to go to directly to a particular page in the catalogue you should add a catalogue number at the end of the shortcut URL. For example bcra.org.uk/cregj71. Note that the catalogue number is usually the issue number but not in the case of C&KS. E.g. the catalogue number for issue 46(1) is 136.
- If, instead, you want to force the link to go directly to the latest page in the catalogue you should add /latest at the end of the shortcut URL. For example bcra.org.uk/cregj/latest.
- It is important to remember that the link information that you give, only governs where the customer is taken to when they click on the share attachment. It does not control the image or text that appear in the share attachment.
- The image and text in the share attachment is dictated by our web site, which issues new data when we publish a new item. However, Facebook relies heavily on caching the data so, when a new book or periodical is published, FB will not automatically fetch that new data. Thus, if the share attachment is not displaying the data you expect, you will need (after posting) to click on the [...] icon to the right of your post and click on "Refresh Share Attachment".
- If you post the wrong URL and you want to change the share attachment, you need to edit your post and delete the existing share attachment first. Facebook appears to operate somewhat arcanely and sometimes it is just best to delete the entire post and start again.
- You can experiment by posting to your own timeline and making your post visible only to yourself. Dont forget to reset that setting afterwards.
- If we want a large landscape image, it needs to be 1200 pixels wide by 630 high. Smaller images, or portrait-shaped images are interpreted differently.
- Only a limited amount of text can appear in the share attachment
- FB was reporting circular references until I gave the covers.html page as the canonical URL. I cannot see what the problem was, even using FB's debugger, but it seems to have gone away now.
- FB adds a query string parameter fbclid to the URL. This had the side effect of forcing my covers.html pages to redirect to the appropriate index.html page. My despatcher.php is now re-coded to remove that parameter from the query string before processing it.
- Post a message with a share attachment to your own timeline, visible only to yourself.
- Click on the information logo on the share attachment
- note that it says: Facebook Page: Not found for bcra.org.uk
- Click on Review Page suggestions
- Notice that you cannot find the BCRA FB page in the list provided. Why not?
- It might help if an admin could go to More / Change Group Settings / Group Name and change the Group ID so that it comes up as facebook.com/groups/something-helpful instead of https://www.facebook.com/groups/1485495795064870/
- but that might not be the problem
When someone follows a link to our web site, from Facebook, FB includes the fbclid parameter in the query string (as noted above). It is possible for us to harvest that info, and produce, at the very least, a count of visitors from it - but it needs a volunteer to do that.