我最近將phonegap-facebook-plugin(https://github.com/phonegap/phonegap-facebook-plugin)集成到iOS和Android(同一應用程序)中。Facebook登錄PhoneGap /科爾多瓦應用程序
我想做一些我認爲很簡單的事情:將電話旁路到本地Facebook進行登錄/身份驗證,並且始終使用網絡對話框。一個人如何去完成這件事?
我的登錄代碼目前看起來是這樣的:
初始化代碼:
//facebook initialization
FB.init({
appId: 'xxxxxxxxxxxx', //'<%#= FB_APP_ID %>',//'',
nativeInterface: CDV.FB,
useCachedDialogs: false
});
,登錄電話是:
FB.login(function(response) {
if (response.authResponse) {
// connected
me.signInFacebook({
token: response.authResponse.accessToken,
email: response.authResponse.email,
success: function (data) {
// hide login view and show tabview
form.destroy();
// continue whatever action was previously happening
me.continueAction(tabIndexBack, callback);
},
failure: function (response) {
// show errors Ext.Viewport.down('tabscontainerview').setActiveItem(3);
}
});
} else {
//go back
Ext.Viewport.down('tabscontainerview').setActiveItem(3);
alert('fb login error');
}
},{ scope: "email" });
感謝您的幫助!
我只是想完成相同的!任何幫助? –
http://stackoverflow.com/questions/16576977/is-there-any-facebook-plugin-for-phonegap-2-7-0/16579592#16579592 –