Reputation: 5235
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.
Upvotes: 3
Views: 1044
Reputation: 133
in my case i had to set oauth2 to true. the error was coming from another facebook plugin that was using oauth2 (which we all should be and all fb docs should reflect that, geez) and conflicting with the oauth1 fb session.
Upvotes: 1
Reputation: 43816
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
Upvotes: 4