$cordovaInstagram returns unknown Unknown Provider

I am trying to integrate the $cordovaInstagram plugin of ngCordova in my service:

.factory('ShareInstagramFactory', function($cordovaInstagram, $q) {
    var self = this;
    // Options
    var shareMessage = "Message";
    // Instagram
    self.shareInstagram = function(imageData) {
        var qInstagram = $q.defer();
        $cordovaInstagram.share(imageData, shareMessage).then(function() {
            // Worked
         }, function(err) {
            // Didn't work
        return qInstagram.promise;

    return self;

However, I get the following issue

Error: $injector:unpr
Unknown Provider


All my other ngCordova plugins work as expected.


Did you managed to get it working?

I have a similar problem

It “works” … that is … there is no error, but nothing happens

Did anyone get it to work?
Im having this problem as well.

What is the error you are seeing?

$cordovaInstagram doesn’t exist

I believe the documentation is wrong.
I got around it…Here’s what I did.

  1. Add the ngCordova.plugins.instagram to angular.module
    angular.module('myapp.directives', ['ngCordova.plugins.instagram'])

  2. Then reference it in the controller
    .controller('SettingsCtrl', function($cordovaInstagram) { ...

  3. To share using $cordovaInstagram
    $cordovaInstagram.share({image: imageInBit64, caption: 'Caption Image'})

1 Like