Titanium开发关于FaceBook登录的android方向程序 现在有程序实现了单击按钮,弹出FaceBook的login页面,想要的效果是像iphone上那样单击按钮,实现平滑的,比较漂亮的页面迁移显示login页面。不要这这种像是对话框般的弹出login页 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Ti.Facebook.appid = '140665666012328';Ti.Facebook.permissions = ['publish_stream'];Titanium.Facebook.forceDialogAuth=false;Ti.Facebook.addEventListener('login', function(e) { if(e.success) { alert('Logged in'); }});Ti.Facebook.addEventListener('logout', function(e) { alert('Logged out');});// Use wide button style -- constant not supported on Android yet.var buttonStyle;if(Ti.Platform.name === 'android') { buttonStyle = 'wide';} else { buttonStyle = Ti.Facebook.BUTTON_STYLE_WIDE;}//// create base UI tab and root window//var win1 = Titanium.UI.createWindow({ title : 'Tab 1', backgroundColor : '#fff'});var tab1 = Titanium.UI.createTab({ icon : 'KS_nav_views.png', title : 'Tab 1', window : win1});var label1 = Titanium.UI.createLabel({ color : '#999', text : 'I am Window 1', font : { fontSize : 20, fontFamily : 'Helvetica Neue' }, textAlign : 'center', width : 'auto'});win1.add(label1);// Add the button. Note that it doesn't need a click event listener.win1.add(Ti.Facebook.createLoginButton({ top : 50, style : buttonStyle,})); Android游戏开发遇到小难题 ,大神来解,在线等待!!! 关于Android Socket的使用的问题. ListView控件使用的一些问题 监听网络开关 关于多点触屏的问题研究 Textview如何获得点击处文本的位置 android混淆打包出现的问题 百度地图开发 sqlite内置查看器,用的什么控件? 手机保存视频失败bmp为null Dlna 怎么实现推送手机屏幕(镜像) Titanium的android问题
Ti.Facebook.permissions = ['publish_stream'];
Titanium.Facebook.forceDialogAuth=false;
Ti.Facebook.addEventListener('login', function(e) {
if(e.success) {
alert('Logged in');
}
});
Ti.Facebook.addEventListener('logout', function(e) {
alert('Logged out');
});
// Use wide button style -- constant not supported on Android yet.
var buttonStyle;
if(Ti.Platform.name === 'android') {
buttonStyle = 'wide';
} else {
buttonStyle = Ti.Facebook.BUTTON_STYLE_WIDE;
}//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title : 'Tab 1',
backgroundColor : '#fff'
});
var tab1 = Titanium.UI.createTab({
icon : 'KS_nav_views.png',
title : 'Tab 1',
window : win1
});var label1 = Titanium.UI.createLabel({
color : '#999',
text : 'I am Window 1',
font : {
fontSize : 20,
fontFamily : 'Helvetica Neue'
},
textAlign : 'center',
width : 'auto'
});win1.add(label1);
// Add the button. Note that it doesn't need a click event listener.
win1.add(Ti.Facebook.createLoginButton({
top : 50,
style : buttonStyle,
}));