2011-11-23 6 views
1

this library을 사용하여 API 요청을하고 액세스 토큰을 성공적으로 가져 왔습니다.파이썬 용 Linkedin API

그러나 설명서에 나중에 _access_token_access_token_secret을 어떻게 사용해야하는지 설명하지 않습니다. 나는 다음과 같은 메소드가 있어야한다고 생각합니다 :

set_access_token(_access_token, _access_token_secret) 

그러나이 코드 나 문서에서 이와 같은 메소드를 찾을 수 없습니다.

이 문제를 해결하는 데 도움을주십시오.

답변

1

필자는이 특정 라이브러리 나 API를 사용하지 않았지만이 경우 일반적인 패턴은 토큰을 후속 호출의 인수로 전달한다는 점입니다. 소스를 보면, 나는 __init__.py에 get_user_profile라는 함수를 볼 수 있습니다

def get_user_profile(self, access_token, selectors=None, headers=None, **kwargs): 
    """ 
    Get a user profile. If keyword argument "id" is not supplied, this 
    returns the current user's profile, else it will return the profile of 
    the user whose id is specificed. The "selectors" keyword argument takes 
    a list of LinkedIn compatible field selectors. 
    """ 

그래서 내가 당신을 추측에는 요 단지 (이 경우) 첫 번째 인수로 토큰을 전달하려는.

+0

답장을 보내 주셔서 감사합니다. 마지막으로 http://code.google.com/p/python-linkedin/ api를 사용하여 내 작업을 수행했습니다. 답장을 보내 주셔서 감사합니다. –