Search code examples
ionic3instagram-api

Login with Instagram in IONIC 3 mobile app


I want to implement login with instagram in my IONIC 3 Application.

So is there any plugin available for that ?


Solution

  • Hi there is a plugin for corodva in ionic:

    Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-instagram-plugin
    $ npm install --save @ionic-native/instagram@4
    

    Also you can try auth0 to autentificate: Install

    # installation with npm
    npm install auth0-js @auth0/cordova --save
    
    # installation with yarn
    yarn add auth0-js @auth0/cordova
    

    Code:

    // src/App.js
    
    var Auth0 = require('auth0-js');
    var Auth0Cordova = require('@auth0/cordova');
    
    function getBySelector(arg) {
      return document.querySelector(arg);
    }
    
    function getById(id) {
      return document.getElementById(id);
    }
    
    function getRedirectUrl() {
      var returnTo = env.PACKAGE_ID + '://YOUR_DOMAIN/cordova/' + env.PACKAGE_ID + '/callback';
      var url = 'https://YOUR_DOMAIN/v2/logout?client_id=YOUR_CLIENT_ID&returnTo=' + returnTo;
      return url;
    }
    

    See also here Hope this helps you to go on.