varunoberoi / linkedin-j

Automatically exported from code.google.com/p/linkedin-j
0 stars 0 forks source link

Need to add scope query parameter in request token call since "getConnectionsForCurrentUser()" gives an exception. #122

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

When executing "client.getConnectionsForCurrentUser()" I get the following 
error.

Exception in thread "main" 
com.google.code.linkedinapi.client.LinkedInApiClientException: Access to 
connections denied

I think to get access to network updates users should add "scope" query 
parameter as described in this link.
https://developer.linkedin.com/documents/authentication#granting

It says "Simply append the permissions you want granted in your request token 
call using the "scope" query paramter". But I'm not clear on how to add this 
parameter in the authentication process  
http://code.google.com/p/linkedin-j/wiki/GettingStarted , where ca I add the 
scope query parameter?

Thanks,
Charitha.

Original issue reported on code.google.com by charit...@wso2.com on 21 Sep 2012 at 12:40

GoogleCodeExporter commented 9 years ago
hi i have same error when i fetch the connections from linkedin it's show 

com.google.code.linkedinapi.client.LinkedInApiClientException: Access to 
connections denied

please tell me what i do...

Original comment by bhanupra...@gmail.com on 25 Sep 2012 at 5:05

GoogleCodeExporter commented 9 years ago
The only way I figured out to specify the scope parameters in the request token 
call is,

- go to /com/google/code/linkedinapi/client/constant/LinkedInApiUrls.properties 
file in linkedin-j-core-1.0.416.jar

- change the property "com.google.code.linkedinapi.client.oauth.requestToken" 
eg: 
https://api.linkedin.com/uas/oauth/requestToken?scope=r_basicprofile+r_emailaddr
ess+r_network

But this doesn't seem user friendly since we have to hard-code the permission 
level initially. Please let us know if there is another way of doing this.

Thanks,
Charitha.

Original comment by charitha...@gmail.com on 25 Sep 2012 at 11:22

GoogleCodeExporter commented 9 years ago
Hi

Please add scope parameter. so that Exception in thread "main" 
com.google.code.linkedinapi.client.LinkedInApiClientException: Access to 
connections denied will get removed

Original comment by deepakch...@gmail.com on 27 Sep 2012 at 12:31

GoogleCodeExporter commented 9 years ago
Please add provision to set Scope parameter for linkedin in this lib

Original comment by deepakch...@gmail.com on 28 Sep 2012 at 10:36

GoogleCodeExporter commented 9 years ago
@charitha: could you please explain how to edit LinkedInApiUrls.properties file 
because when i open that file, its not allowing to edit anything.

Original comment by r...@impressol.com on 28 Nov 2012 at 6:42