Im sử dụng ngFacebook bởi Almog Baku trong ứng dụng góc hiện tại của tôi. Trong môi trường thử nghiệm nó hoạt động tốt. Nhưng trong apk xây dựng qua phonegap nó không hoạt động. Tôi đã bao gồmngFacebook không hoạt động với phonegap
<dependency id="cordova-plugin-inappbrowser" />
và
<feature name="InAppBrowser">
<param name="android-package" value="org.apache.cordova.InAppBrowser" />
</feature>
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>
vào config.xml
tôi quá nhưng vẫn không có InAppBrowser hoặc tab mới poping lên.
My App.js
là
var myApp = angular.module('myApp', [
'ngTouch',
'ngRoute',
'myApp.controllers',
'ngIdle',
'ngFileUpload',
'ng.deviceDetector',
'oitozero.ngSweetAlert',
'angular-hmac-sha512',
'ngFacebook'
]);
myApp.config(function($facebookProvider) {
$facebookProvider.setAppId('1869339203095182');
});
Và trong bộ điều khiển của tôi:
$scope.login = function() {
$facebook.login().then(function() {
refresh();
});
}
$rootScope.$on('event:social-sign-in-success', function(event, userDetails){
console.log(userDetails);
})
function refresh() {
$facebook.api("/me",{fields: 'id,name,email'}).then(
function(response)
{
//console.log(response);
},
function(err) {
console.log(err);
//$scope.welcomeMsg = "Please log in";
}
);
}
refresh();
Bạn có thấy điều này không? https://stackoverflow.com/questions/30380657/cannot-log-into-facebook-via-ngfacebook-on-angularjs-app –
hoạt động trong môi trường thử nghiệm nhưng không hoạt động trong apk build. Thậm chí không bật lên bất cứ điều gì. – Debra
@RameshRajendran nếu bạn có thể đặt tiền thưởng cho câu hỏi này, Xin vui lòng, Nó sẽ thực sự giúp đỡ rất nhiều. – Debra