Ant Smith
donate to Ant Smith


Website Integration of facebook Social Plug-ins

    In this article I look at

  • Allowing cross-site scripts to execute to enable social plug-ins

  • Managing URLs, so plug-ins know what to do

  • Adding metadata for administration of plug-in content

  • Adding the plug-in code to a page

This entire discussion concerns creating web pages with PHP (in fact PHP version 7.3.20). You might find this useful even if you're creating pages in some other way, or not, I don't really know – YOU DECIDE!

    My website provides 3 facebook integrations:

  • The 'Like' button and counter (top of page)

  • 'Share' the page (in the Share Box near the bottom of the page)

  • 'Comment' on the page (under the Share Box)

The trouble with this world today is that everything seems to be somebody else's problem.

curmudgeon, 2020

In principle the facebook social plug-ins are pretty straightforward, leastways that's how it seems when you read the documentation.. They even have configuration tools in the documentation that automagically creates all the code you need – hummm, except it doesn't.

Well, it does if you've already set-up a facebook developer account. And created an Application Identifier. And added the special Metadata tags needed to your page; And created the security headers that allows facebook scripts to run on your own website...

Sure you can search on-line to find out how to do all of the foregoing; once you realise you need to do all of the foregoing; but there doesn't seem to be many (or any) one-stop references covering the whole story. So I thought I'd jot down what I've discovered and implemented on my own website, in case it might be useful; even if it's not.

Enabling Social Plug-Ins

In essence a social plug-in is a small section in a page on your website that executes code that resides on the service provider's website; I.e code that you have no real control over. It might well do what you want (allow comments, likes etc...) but it might do other stuff too (track the behaviour of your website visitors) –...[Read On]


New Language


The New Normal.

Stay Safe.

Stay Well.

Stay Home.

Save Lives.

So much camel case.

Short of breath?

image illustrating New Language

Yorkshire Sculpture Park

Crystal Grotto Profile Detail

I took this photograph specifically to play with 'fault-lines' as readilly apparent in the structure of the (presumably) quartz construction material. Cutting perpendicularly through those natural (horizontal) fault-lines the sculpture fractures the light pasing through it to deliver a bold light versus dark contrast. In the result I see a suggestion of two faces - one skull-like, the other quite baby-ish; albeit somewhat of a grotesque.

image illustrating Crystal Grotto Profile Detail


Uncle Fester's Fidgety Fingers

Uncle Fester spent his days sitting at the beaten up drop leave table in the corner of our kitchen constantly a tip tap tapping his fingers in a rhythm alien to the sensibilities of those around him. At first it had been menacing. Then maudlin. And finally maddening. The pastor who lived at number six stopped stopping by for his harvest festival donation demands and his inglorious attempts to save Ma's soul (ever since dad had walked over those furnace hot plates and burned his feet right off the pastor had taken an increased interest in Ma's soul). None of us missed the pastor very much, least of all Ma's ample soul. Less happily the constant drumming had driven Mitch, Lizzie's handsome young suitor, to self harming such that his face and arms looked somewhat akin to a bloodied scarecrow. The house was often filled with the horrified shrieks of the young 'uns, should they chance upon him blundering out of the lavvy or weeping in a corner. Uncle Fester had a profound effect on the house, and the village, when first he had arrived.

"Stick another fag in Uncle Fester's fingers would you love?" Ma asked.

We'd tried everything to still his beating fingertips. Soft cloths would get knotted round the knuckles until we were a feared he'd snap his fingers off and they'd go parading about the place causing eleven times the trouble. Weighty books on the back of his hands would routinely skitter off to drop open on the floor where the dog would worry, with a loud and long howling, that it couldn't read a word (we had a particularly stupid dog). Buckets of water and bowls of thick viscous soup would equally just splash about leaving a right royal mess. The only thing that would give a moment's reprieve was a Lambert & Butler Superking on each juddery in-draw. The cacophony of the pursuant coughing was an angelic chorus in comparison to the otherwise incessant drumming. We fed Uncle Fester's pleurisy to excess for the relief it bought.

In the...[Read On]




Cockahoop animations at their finest! Animating Plaything


Weird Scenes EP

The first EP from The GameCat recorded at live venues and studios around London through 2010 and 2011.

image illustrating Audio


Things To Buy

Checkout my PHOTO SHOP, a whole range of CHEAP eBOOKs, and many other bits and pieces you will enjoy.

image illustrating BUY