I was also getting the following error even when using the standard embed code that Facebook provides.
Uncaught Error: invalid version specified in sdk.js
The first thing to check is that you’re including the version number in your FB.init
call:
FB.init({
appId: 'your-app-id',
xfbml: true,
version: 'v2.8'
});
The now-outdated fix…
…was to make a simple tweak and changed the path:
From: //connect.facebook.net/en_GB/sdk.js
To: //connect.facebook.net/en_GB/all.js
And this fixed the error. Unfortunately I have no idea why. 🙁