Invalid version specified, facebook share plugin error

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. 🙁

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)