You are not showing your code, so not able to see what your authorize url? If thats url not working , you can use following code.
连接=功能(CLIENT_ID,REDIRECT_URI,显示器) this.client_id = CLIENT_ID?; this.redirect_uri = redirect_uri;
var authorize_url = "https://graph.facebook.com/oauth/authorize?";
authorize_url += "client_id=" + client_id;
authorize_url += "&redirect_uri=" + redirect_uri;
authorize_url += "&display="+ (display ? display : "touch");
authorize_url += "&type=user_agent";
var ref = window.open(authorize_url, 'random_string', 'location=no');
ref.addEventListener('loadstart', function(event) {
//alert(event.type + ' - ' + event.url);
});
ref.addEventListener('loadstop', function(event) {
var access_token = event.url.split("access_token=")[1];
var error_reason = event.url.split("error_reason=")[1];
if(access_token != undefined){
access_token = access_token.split("&")[0];
setTimeout(function() {
ref.close();
}, 5000);
}
if(error_reason != undefined){
window.location.href = "error.html";
setTimeout(function() {
ref.close();
}, 5000);
}
//console.log(event.url); alert(event.type + ' - ' + event.url);
});
ref.addEventListener('exit', function(event) {
//alert(event.type);
});}
来源
2013-10-19 13:22:33
Ved
具有u添加<访问起源= “*”/>在乌拉圭回合config.xml中 –
@mvp是的,它是在config.xml中 – asna
已经添加不工作Twitter和FB登录? –