Take the 2-minute tour ×

In using the new Javascrip SDK for facebook I get the following error when trying to

(function() {
e.src = document.location.protocol +
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});

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.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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

share|improve this answer

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.

share|improve this answer

Your Answer


