Linkedin Api for python not working correctly
Question: Linkedin Documents are confusing like crazy. I just want to get some basic
information. I need to get a company's recent updates, comments for the
update, and how many likes the update got. I tried to follow the documentation
and this is my code:

    
    
    from linkedin import linkedin
    import oauth2 as oauth
    import httplib2
    
    api_key = '9puxXXXXXXX'
    secret_key = 'brtXoXEkXXXXXXXXX'
    auth_token = '75e15760-XXXXXXXXXXXXXXXXXXXXXX'
    auth_secret = '10d8caXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
    RETURN_URL = 'http://localhost:8000'
    
    cos = oauth.Consumer(api_key,secret_key)
    
    access_token = oauth.Token(key=auth_token, secret=auth_secret)
    
    client = oauth.Client(cos,access_token)
    
    resp,content = client.request("http://api.linkedin.com/v1/companies/1219692/updates?start=0&count=10", "GET", "")
    

This code is supposed to get the 10 recent updates for apple, but this is what
I get when I

    
    
    print resp
    print content
    
    
    {'status': '200', 'content-length': '78', 'content-location': u'http://api.linkedin.com/v1/companies/216984/updates?count=10&oauth_body_hash=2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D&oauth_nonce=87365476&oauth_timestamp=1372347259&oauth_consumer_key=9puxXXXXXXX&oauth_signature_method=HMAC-SHA1&oauth_version=1.0&start=0&oauth_token=75e1576XXXXXXX&oauth_signature=EhcMiQXXXXXXX%3D', 'transfer-encoding': 'chunked', 'vary': '*', 'server': 'Apache-Coyote/1.1', 'connection': 'close', '-content-encoding': 'gzip', 'date': 'Thu, 27 Jun 2013 15:34:18 GMT', 'x-li-request-id': '84BXIU5ZQK', 'x-li-format': 'xml', 'content-type': 'text/xml;charset=UTF-8'}
    

what am I doing wrong?


Answer: Your code does not make sense, you imported linkedin module, which seems to be
[this module](https://github.com/ozgur/python-linkedin), but I can't see you
are using that API wrapper in your code. If I'm wrong you can still use the
wrapper above and easily handle data back from LinkedIn. Just take a look at
this example:

[Querying updates](https://github.com/ozgur/python-linkedin#company-api)

sample:

    
    
    from linkedin import server
    
    application = server.quick_api(KEY, SECRET)
    application.get_company_updates(1035, params={'count': 2})
    

where 1035 is the ID of the company you are trying to get updates from.

