In my ionic app. I have installed linkedin plugin. In the linkedin developers page I have given authorized URL as http://localhost/callback
& in under the mobile section I have given the I have given the package name as io.ionic.starter
& package hash as 64 base SHAI code as he described in this link
This is my code
scopes: LinkedInLoginScopes[] = ['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share'];
isLoggedIn: boolean = false;
selfData = { id:"", firstName:"", lastName:"", emailAddress:"" };
// linkedin login
linkedinLogin() {
this.linkedin.login(this.scopes, true)
.then(() => {
this.isLoggedIn = true;
this.getSelfData();
})
.catch(e => console.log('Error logging in', e));
}
// get data from linkedin
getSelfData() {
this.linkedin.getRequest('people/~')
.then(res => {
this.selfData = res;
console.log(this.selfData);
this.openProfile(res.id);
this.presentAlert(res);
//this.authservices.linkedinAuth(this.selfData);
})
.catch(e => console.log(e));
}
openProfile(memberId) {
this.linkedin.openProfile(memberId)
.then(res => console.log(res))
.catch(e => console.log(e));
}
presentAlert(profile) {
let alert = this.alertCtrl.create({
title: profile,
subTitle: profile,
buttons: ['Dismiss']
});
alert.present();
}
When I click on the button I don’t get any response. I’m unable to figure out the problem.