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
In this article I look at
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!
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)
My website provides 3 facebook integrations:
The trouble with this world today is that everything seems to be somebody else's problem.
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]