开发者

appcelerator titanium : close facebook view

开发者 https://www.devze.com 2023-03-09 04:42 出处:网络
I am new to appcelerator titanium, i created a mobile project, tried the following code to connect to facebook:

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

精彩评论

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