Created
November 13, 2012 19:36
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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