我试图在我的linkedin中获取组,我正在使用这个调用http://api.linkedin.com/v1/people/~/group-memberships?count=10&start=10&format=json但是当我尝试调用这个url时收到错误消息“拒绝访问组成员”。
这是我的代码:
String message="";
Token requestToken;
service = new ServiceBuilder()
.provider(LinkedInApi.class)
.apiKey("XXXXXXXXXX")
.apiSecret("XXXXXXXXXX")
.build();
requestToken = service.getRequestToken();
String url = "http://api.linkedin.com/v1/people/~/group-memberships?count=10& start=10&format=json";
OAuthRequest request = new OAuthRequest(Verb.GET, url);
request.addHeader("Content-Type", "application/json");
service.signRequest(linkrdInToken, request);
Response response = request.send();