简体   繁体   English

如何在Android中使用oAuth获取用户Linkedin个人资料的Linkedin连接

[英]how to get the Linkedin connections for users Linkedin profile using oAuth in android

I am trying to get the connections for users profile in android.I have tried the following code.but it doesn't work out.I am getting an exception that "Access to connections denied". 我正在尝试在android中获取用户个人资料的连接。我尝试了以下代码。但无法解决。我遇到了“访问连接被拒绝”的异常。 I am new to android,can u please help me out. 我是android新手,请你帮帮我。

LinkedinSampleActivity.java LinkedinSampleActivity.java

    public void getConnections(){

    Connections connections = client.getConnectionsForCurrentUser();
    Log.d("Connections",""+ connections.toString());
    //System.out.println("Total connections fetched:" + connections.getTotal());
    for (Person person : connections.getPersonList()) {
            System.out.println(person.getId() + ":" + person.getFirstName() + " " + person.getLastName() + ":" + person.getHeadline());
    }
  }

I have called this method in the same activity. 我已经在同一活动中调用了此方法。

您可能要检查开发者LinkedIn帐户中的APP设置,并确保已启用OAuth协议中的r_network复选框。

从上次看来,LinkedIn可能会限制其API调用服务,例如,不再可能通过调用API来获得用户的连接,请参见: https : //www.quora.com/Does-LinkedIns-API-allow-a-site -to-grab-a-users-contacts-information以及以下信息https : //developer.linkedin.com/blog/posts/2015/todays-changes

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM