ios - User Authentication using linkedin -
i trying sign using linkedin.once succesful login,i write following code.my problem when acceses token use same api lisdksession *session = [[lisdksessionmanager sharedinstance] session]; nsstring *at=[[session accesstoken] accesstokenvalue]; nsstring *url=[[nsstring alloc] initwithformat:@"https://api.linkedin.com/v1/people/~:(email-address)?oauth2_access_token=%@&format=json",at]; in response follwing { "errorcode": 0, "message": "unable verify access token", "requestid": "xxfro610rp", "status": 401, "timestamp": 1443599825188 }
don't pass access token request. once user authorized , permissions assigned, try this.
if ([lisdksessionmanager hasvalidsession]) { nsstring *url=[[nsstring alloc] initwithformat:@"https://api.linkedin.com/v1/people/~:(email-address)&format=json"]; [[lisdkapihelper sharedinstance] getrequest:url success:^(lisdkapiresponse *response) { // response } error:^(lisdkapierror *apierror) { // error }]; ]}
Comments
Post a Comment