开发者

appcelerator titanium : close facebook view

I am new to appcelerator titanium, i created a mobile project, tried the following code to connect to facebook:

Titanium.Facebook.appid = '[my appid]';
Titanium.Facebook.permissions = ['publish_stre开发者_开发技巧am'];
Titanium.Facebook.addEventListener('login', function(e) {
    if (e.success) {
        alert('Logged in');
    }
});
Titanium.Facebook.addEventListener('logout', function(e) {
    alert('Logged out');
});
// add the button.  Note that it doesn't need a click event or anything.
Titanium.UI.currentWindow.add(Titanium.Facebook.createLoginButton({ top: 50, style: 'wide' }));

what I failed to do is closing the facebook webview and going back to my application, can anyone help me on that?

thanks in advance


Good walkthru here facebook-module-changes-in-titanium-mobile-1-6-0.html.

I suspect you are not setting your APPID correctly in tiapp.xml

See Titanium.Facebook-module

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜