Skip to content

Instantly share code, notes, and snippets.

@mjhea0
Created November 13, 2012 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjhea0/4067873 to your computer and use it in GitHub Desktop.
Save mjhea0/4067873 to your computer and use it in GitHub Desktop.
Super simple Python script for pulling your Linked-In contacts and outputting them to the screen
#!/usr/bin/env python
import oauth2 as oauth
import httplib2
import time, os
#authenticate
api_key = 'XXXXX'
api_secret = 'XXXXX'
user_token = 'XXXXX'
user_secret = 'XXXXX'
api = oauth.Consumer(api_key, api_secret)
token = oauth.Token(key=user_token, secret=user_secret)
client = oauth.Client(api, token)
response,content = client.request("http://api.linkedin.com/v1/people/~/connections", "GET","")
print response
print "\n"
print content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment