我正在爲手機開發,我有一個簡單的應用程序,在web視圖中啓動一個頁面(沒有瀏覽器工具欄,地址欄等)。由於這個瀏覽器配置不能真正處理彈出窗口,我怎麼能實現它不啓動一個彈出窗口,而是一個簡單的URL調用oauth?並且我還想在以下代碼中使用display =「touch」功能:fb.login從新手的問題 - 如何實現display = touch?
jQuery(document).ready(function($){
if (window.FB) {
FB.init({appId: '123456789000000',
status: true,
cookie: true,
xfbml: true});
$('html').attr('xmlns:og', 'http://opengraphprotocol.org/schema/');
$('html').attr('xmlns:fb', 'http://www.facebook.com/2008/fbml');
}
});
function fbc_login() {
if (window.FB) {
FB.login(function(response) {
if (response.session) {
window.location = 'http://www.mobii.hu/';
}
},
{ perms: 'email'
});
}
};
function fbc_logout() {
if (window.FB) {
FB.logout(function(response) {
window.location = 'http://www.mobii.hu/index.php?option=com_comprofiler&task=logout&Itemid=2';
});
}
};
function fbc_unjoin() {
if (window.FB) {
if (confirm('Are you sure you want to unjoin http://www.mobii.hu?')) {
FB.api({
method: 'Auth.revokeAuthorization' }, function(response) {window.location = 'http://www.mobii.hu/';});
}
}
};
jQuery(document).ready(function($){
if (window.FB) {
FB.logout(function(response) {});
}
});
非常感謝提前!
謝謝你這麼好! :) – iUsable