2013-05-16 43 views
2

我在API中使用鏈接。我想通過使用名稱來搜索我的連接。這是做 我的第二件事是我需要得到的searched users new connection,get status update and provide status update獲取特定用戶在API中鏈接的網絡更新

我正在使用linkedin-j jar文件。

我得到了整體連接的新連接。

Network network = linkedin.getConnectionsNewConnectionNetwork(linkedinCrawlerWithOAuth.liClientWithAuth); 
     System.out.println("Total updates fetched:" + network.getUpdates().getTotal()); 
     System.out.println("--------NetWork Updates ---------\n"); 
     for(Update update:network.getUpdates().getUpdateList()){ 
      Connections newConnection =linkedin.getConnectionsFromUpdateContent(linkedinCrawlerWithOAuth.liClientWithAuth,update.getUpdateContent()); 
      for(Person person:newConnection.getPersonList()){ 
       if(!("private".equals(person.getId()))){ 
        printProfileDetails(linkedin.printProfileById(linkedinCrawlerWithOAuth.liClientWithAuth,person)); 
       } 
      } 
     } 

但我想獲得特定用戶的新連接。你能幫我嗎?

回答

0

您可以嘗試獲取類型連接(CONN)的網絡更新。這將返回配置文件在上下文中創建的新聯繫人。 在REST形式是,

http://api.linkedin.com/v1/people/~/network/updates?type=CONN&count=50&start=0 

這是REST API調用。 linkedin-j jar的Connections API中應該有等效的簽名。

相關問題