小编Deb*_*bra的帖子

ngFacebook无法使用phonegap

我在当前的角度应用中使用了Almog Baku的ngFacebook.在测试环境中,它工作正常.但是在apk版本中通过phonegap它无法正常工作.我已经包括在内

<dependency id="cordova-plugin-inappbrowser" />

和

<feature name="InAppBrowser">
<param name="android-package" value="org.apache.cordova.InAppBrowser" />
</feature>
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>
Run Code Online (Sandbox Code Playgroud)

进入我的config.xml但仍然没有InAppBrowser或弹出的新标签.

我的App.js是

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');
});
Run Code Online (Sandbox Code Playgroud)

在我的控制器中:

$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 …
Run Code Online (Sandbox Code Playgroud)

javascript phonegap-plugins angularjs cordova phonegap

8
推荐指数
1
解决办法
171
查看次数