Skip to content

Instantly share code, notes, and snippets.

@jrmcdona
Created November 19, 2016 02:40
Show Gist options
  • Save jrmcdona/a1cd972839594b5fefa8ffa4ac134ba0 to your computer and use it in GitHub Desktop.
Save jrmcdona/a1cd972839594b5fefa8ffa4ac134ba0 to your computer and use it in GitHub Desktop.
Unknown provider: $ionicFacebookAuthProvider <- $ionicFacebookAuth
Hi Folks, I have gone through the set up but I am unable to get the Facebook auth provider injected.
Here are some snippets.
I am not sure what else to try or what step I have missed:
Unknown provider: $ionicFacebookAuthProvider <- $ionicFacebookAuth
Any ideas, thanks?
In my app.js I inject ionic-cloud:
angular.module('safetypin', ['ionic', 'ionic.cloud', 'safetypin.controllers', 'safetypin.services' ])
in my html file I have a reference:
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/ionic.cloud.min.js"></script>
In my controller:
angular.module('safetypin.controllers', ['ionic.cloud'])
.controller('facebook', function ($scope, $ionicFacebookAuth, $ionicUser, $state) {
var self = this;
console.log($ionicUser);
$scope.facebookLogin = function () {
$ionicFacebookAuth.login().then(
function (response) {
console.log('response ' + response);
$state.go('tab');
}
);
}
@humayunjavaid
Copy link

same problem! any solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment