我正在尝试用节点和护照开发facebook连接。但我在浏览器控制台中遇到此错误:
拒绝在一个框架中显示“https://www.facebook.com/dialog/oauth?response_type=code&redirect_uri=http% ... te_event%2Cuser_birthday%2Cemail& client_id = 632348833449996& type = web_server”,因为它将“X-Frame-Options”设置为“DENY”。关于:空白:1
这是代码的一部分:
passport.use(new FacebookStrategy({
clientID: "XXX",
clientSecret: "XXX",
callbackURL: "`http://localhost:3000/auth/facebook/callback`"
},
function(accessToken, refreshToken, profile, done) {
var fullname = profile._json.first_name + ' ' + profile._json.last_name;
// Web services all for user persistence
}
));
// configure Express
app.configure(function() {
app.use(express.logger());
app.use(express.cookieParser());
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.session({ secret: 'keyboard cat' }));
// Initialize Passport! Also use passport.session() middleware, to support
// persistent login sessions (recommended).
app.use(passport.initialize());
app.use(passport.session());
app.use(app.router);
});
app.all('/auth/facebook', passport.authenticate('facebook', { scope: ['read_stream', 'publish_actions','user_interests','read_friendlists','create_event','user_birthday','email' ]}));
app.all('/auth/facebook/callback', passport.authenticate('facebook',{ successRedirect: '/',failureRedirect: '/login' }));
app.listen(3000);
在我的Facebook应用配置中,我使用以下网址设置App On Facebook配置:http://localhost:3000/auth/facebook/
我做错了什么?