【发布时间】:2011-12-09 14:23:18
【问题描述】:
在为 facebook 使用新的 Javascrip SDK 时,我在尝试时遇到以下错误
(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();}
未捕获的错误:FB.Auth.setAuthResponse 仅与 OAuth2 兼容
这是什么原因?我的应用程序处于 SSL 模式,我似乎无法弄清楚为什么会出现该错误。
【问题讨论】: