I have installed the plugin and added the code as following
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Instagram } from "ng2-cordova-oauth/core";
import { OauthCordova } from 'ng2-cordova-oauth/platform/cordova';
import { UserService } from '../../providers/user-service';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
private oauth: OauthCordova = new OauthCordova();
private instagramProvider: Instagram = new Instagram({
clientId: "2d####################9", // Register you client id from https://www.instagram.com/developer/
redirectUri: 'http://localhost', // Let is be localhost for Mobile Apps
responseType: 'token', // Use token only
appScope: ['basic', 'public_content']
/*
appScope options are
basic - to read a user’s profile info and media
public_content - to read any public profile info and media on a user’s behalf
follower_list - to read the list of followers and followed-by users
comments - to post and delete comments on a user’s behalf
relationships - to follow and unfollow accounts on a user’s behalf
likes - to like and unlike media on a user’s behalf
*/
I am redirected to insatgram login page ,but i always get an error as invalid username though i enter correct username and password.What am i doing wrong ,any inputs.
I have installed the plugin and added the code as following
import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { Instagram } from "ng2-cordova-oauth/core"; import { OauthCordova } from 'ng2-cordova-oauth/platform/cordova'; import { UserService } from '../../providers/user-service';
@Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage {
private oauth: OauthCordova = new OauthCordova();
private instagramProvider: Instagram = new Instagram({ clientId: "2d####################9", // Register you client id from https://www.instagram.com/developer/ redirectUri: 'http://localhost', // Let is be localhost for Mobile Apps responseType: 'token', // Use token only appScope: ['basic', 'public_content']
});
private apiResponse;
constructor(public navCtrl: NavController, public UserService: UserService) { this.apiResponse = []; }
ngOnInit() { this.oauth.logInVia(this.instagramProvider).then((success) => {
}
}
I am redirected to insatgram login page ,but i always get an error as invalid username though i enter correct username and password.What am i doing wrong ,any inputs.