ionic2 - Ionic 3 Native - LinkedIn login error -
i have used ionic native linkedin plugin in ionic 3 app.
my code:
var scopes = ['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share']; this.linkedin.login(scopes, true).then((res) => { console.log(res) ; }, (err) => { console.log(err) ; }); and have error:
argument of type 'string[]' not assignable parameter of type 'linkedinloginscopes[]'. type 'string' not assignable type 'linkedinloginscopes'.
help me please.
you need define type of scopes.
type of scopes argument in plugin wrapper-
export type linkedinloginscopes = 'r_basicprofile' | 'r_emailaddress' | 'rw_company_admin' | 'w_share';
login(scopes: linkedinloginscopes[], prompttoinstall: boolean): promise { return; }
let scopes:any = ['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share']; or
let scopes:array<string> = ['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share']; this.linkedin.login(scopes, true).then((res) => { console.log(res) ; }, (err) => { console.log(err) ; });
Comments
Post a Comment