2013-08-21 69 views
3

我使用LinkedIn Api來搜索人員信息,LinkedIn Api:我得到了「拒絕訪問人員搜索」。

我保持每個用戶的限制。 (儘管我只想公開信息,但似乎必須使用已登錄的用戶令牌發送請求)。

所以我註冊了一些人對我的應用程序,以獲得更多的令牌,但是當我使用的令牌,我得到:「人們訪問搜索被拒絕」

可能是什麼原因?

回答

0

沒有足夠的信息來解決這個問題,但LinkedIn有他們的throttle limits明確的文件。這對我來說從來都不是問題,所以我認爲你可能會進行不必要的API調用。我知道API返回的數據嵌套得非常深,您可能不需要進行如此多的API調用來獲取所需的數據。我會向終端打印一個API響應並檢查數據。我使用Python,通常需要挖掘3或4個級別來獲取我需要的數據。防爆。

updates = app.get_company_updates(COMPANY_ID, params={'count': count, 'event-type': 'status-update',}) 

update_list = [] 
for update in updates['values']: 
    my_dict = {'comment': update['updateContent']['companyStatusUpdate']['share']['comment']} 
    if update['updateContent']['companyStatusUpdate']['share'].get('content'): 
     my_dict['description'] = update['updateContent']['companyStatusUpdate']['share']['content'].get('description') 
     my_dict['submittedImageUrl'] = update['updateContent']['companyStatusUpdate']['share']['content'].get('submittedImageUrl') 
     my_dict['title'] = update['updateContent']['companyStatusUpdate']['share']['content'].get('title') 
     my_dict['shortenedUrl'] = update['updateContent']['companyStatusUpdate']['share']['content'].get('shortenedUrl') 
    update_list.append(my_dict) 

但如果你真的需要打很多,那麼你可能要設置很多腳本,對一個cron作業每天採用了獨特的開發人員登錄每個腳本運行的API。

相關問題