In using the new Javascrip SDK for facebook I get the following error when trying to
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);}());
window.fbAsyncInit = function(e) {
var curLoc = window.location;
var channel = curLoc.protocol + "//" + curLoc.hostname + (curLoc.pathname).substr(0,(curLoc.pathname).lastIndexOf('/')) + "/channel.html";
FB.init({ appId: APP_ID,
status: true,
cookie: true,
xfbml: true,
channelUrl: channel,
oauth: true});
FB.getLoginStatus(isUserLoggedIn);
FB.Canvas.setAutoGrow();}
Uncaught Error: FB.Auth.setAuthResponse only compatible with OAuth2
What would be the cause of this? my app is in SSL mode and I can’t seem to figure out why that error shows up.
Is that definitely the only place the JS SDK is included? Check for copy/pasted Like button init code, etc.
I’ve seen this error occur when people are including the JS SDK with some parameters in the URL (i.e including //connect.facebook.net/en_US/all.js#appid=x somewhere) – this overrides some of the parameters in the FB.init call and can result in the error message you’re getting