Uncategorized

LinkedIn API: First steps using Python

My enthusiasm  for LinkedIn increased dramatically once I learned that LinkedIn had opened up its API to the public at large.  What is still unclear to me is how much the API allows one to get data in and out LinkedIn.   One of the best ways to find out:  dive in and see what we can learn.

In this post, I describe  some first steps you can take to learn to access the LinkedIn API  with Python (a favorite programming language of mine and many):

  1. Get oriented by looking the main page for the API, which in this case, is  LinkedIn Developer Network.
  2. You'll need a set of developer keys for each application, which you can get by registering an application.  You'll be asked to login with your LinkedIn user account email/password.  If you don't yet have a LinkedIn user account, sign up for one. (Using the API doesn't require a separate developer account.)
  3. I found a few tricky bits in the registration process.   First of all, you're going to have remind yourself (or teach yourself for the first time) the basics of OAuth, an open protocol used by LinkedIn (and other websites) to authorize users.   (I won't attempt to provide such a tutorial here. A set of slides  from LinkedIn does a pretty good job of giving an overview of OAuth. ) The second tricky part was that I forgot whether OAuth could support desktop applications.  It turns out that you do get 3 options for the types of app you are registering: desktop, web, and mobile.  In my case, I registered that I was creating a desktop app.
  4. When you are finished registering your application, you will get two important parameters for your app:  the OAuth (consumer) key and secret. You will need these two parameters for your Python application.
  5. You can choose to work with the API directly at  the HTTP level protocol level or look for API libraries that wrap the protocol.  I searched for such a Python library, and found pylinkedin (a barebone but functional library), whose source you can get via mercurial by hg clone https://pylinkedin.googlecode.com/hg/ pylinkedin
  6. Install the library using the usual python setup.py install.  pylinkedin was tested on Python 2.5 but so far, I've found it to work on Python 2.6. Note that the library requires that you have the  oauth Python library installed (available via svn at  http://oauth.googlecode.com/svn/code/python/
  7. You will need to correct a small bug that I found in pylinkedin (around the parsing of companies) -- you'll need to edit the __init__.py file according to instructions I posted.

Now we're ready to run the following code, which will display the first and last name of your LinkedIn "connections" (the people in your immediate circle).  Remember that key and secret you got when you registered your application: plug them into the following program.  (Note that a browser window should open prompting you for your LinkedIn password.  You'll then have to enter a code that LinkedIn gives you to let the program access your LinkedIn data.)

# insert your application KEY and SECRET

API_KEY = "_FILL_IN_YOUR_KEY_"
SECRET_KEY = "_FILL_IN_YOUR_SECRET_"

import webbrowser

from linkedin import LinkedIn
li = LinkedIn(API_KEY, SECRET_KEY)

token = li.getRequestToken(None)

# prompt user in the web browser to login to LinkedIn and then enter a code that LinkedIn gives to the user

auth_url = li.getAuthorizeUrl(token)
webbrowser.open(auth_url)
validator = input("Enter token: ")
access_token=li.getAccessToken(token,validator)

# list all connections

connections = li.connections_api.getMyConnections(access_token)

print "number of connections: ", len(connections)
for c in connections:
    print c.firstname, " ", c.lastname

There are obviously improvements to make in this starter code -- but this should get us all on our way.

Acknowledgements: Thanks to LinkedIn for the API and to Max Lynch for pylinkedin, which made getting into the API much easier!

Uncategorized

Comments (0)

Permalink

Two reviews of my book

Yesterday, I was very pleased to read Ralph LeVan's review in Ariadne (Issue 57):

I can’t imagine a more comprehensive book on mashups. This book would make a great textbook for a class on the topic. If you are a developer of mashups, this book must be in your reference library. However, if you’re looking for a gentle introduction to the topic, it may be more than you want.

(Thanks to Lorcan Dempsey for pointing out the review to me.)

A little while ago, I also learned about a review on a German blogger: Pro Web 2.0 Mashups: Remixing Data and Web Services. Buchrezension. Since I can't read German, I turned to Google Translate (Pro Web 2.0 mashups: Remixing Data and Web Services. Book reviews). From what I can glean, the review seems very positive.

Uncategorized

Comments (0)

Permalink

My talk at the Library of Congress

The talk I gave recently at the Library of Congress on web 2.0 mashups might be of interest to you all. The recording of the talk is available now from the LC site:

http://www.loc.gov/today/cyberlc/feature_wdesc.php?rec=4346

I tried not to be to be too technical while working in some technical details on the side for those in audience who want to know more.

Uncategorized

Comments (0)

Permalink

How to download code for this book

For those of you who have tried to download code for the book but haven't been able to find the download, there are currently two places you can download the code for the examples in the book. First, you can download it from mashupguide.net:

http://examples.mashupguide.net/ProWeb20MashupsCode.zip

Alternatively, you can go to Apress, the publisher. That is,

http://apress.com/book/downloadfile/3901

specifically,

http://apress.com/resource/bookfile/3901

(Beware that the mime-type of the page is not set correctly for the web server. You may need to right click on the link and choose "Save File As" or "Download Linked File As")

My apologies to my readers who have been inconvenienced by the usability problems of my web presence!

Uncategorized

Comments (0)

Permalink

Notelets for 2008.05.20

AIM announces winners of the Open AIM Developer Challenge. Some coverage:

OUseful Info: An OpenLibrary API Handshake With Yahoo Pipes cf my PW post (Open Library API: Cataloging 13 Million Books)

BTW, I just created a record in OpenLibrary for Pro Web 2.0 Mashups, my book.

Notelets
Uncategorized

Comments (0)

Permalink

My interview with Jon Udell: "Working with Data Sources"

I'm pleased to announce that my first book interview is now online: Working with Data Sources, part of Jon Udell's Interviews With Innovators. I was excited and a bit nervous talking to Jon over the phone, someone whose work I've admired for years. Undoubtedly, I was pleased with his take on my book:

The book is chock full of good examples. Even if you’re an experienced developer of mashups that involve Flickr, del.icio.us, Eventful, and the various mapping services, you’ll learn helpful strategies for using these services individually and in combination.

It turned out that we didn't end up talking that much about my book. The abstract of the interview captures how we did spend our time: "On this edition of Interviews with Innovators, host Jon Udell asks Yee about teaching students how to work with existing data sources, and on ways to expand the supply of available sources."

Take a listen to the interview -- there's a lot of food for thought, especially because Jon provided tons of insight into the subject. I'll follow up tomorrow with my reflections on the interview, what I said, what Jon said, what I meant to say, and what there is to say with more time to ponder.

Uncategorized

Comments (0)

Permalink

My book sighted at the UC Berkeley bookstore

This is the first time I actually saw my book at a in-real-life brick & mortar bookstore, specifically the UC Berkeley ASUC bookstore. Needless to say, I was pretty psyched!

Uncategorized

Comments (0)

Permalink

I taught the Intro to Mashups at Mashup University

Yesterday, I led two sessions at Mashup University (part of Mashup Camp #6), held in Mountain View, CA:

Mashup 101: Getting Oriented to the World of Mashups

This session will help you to understand what will be happening at Mashup University and Mashup Camp. We begin with a non-technical introduction to mashups and their applications and move towards a more technical discussion of how to create mashups and to make your data and services mashable.

and

Mashup 201: Slightly More Advanced Topics in Mashups

This talk surveys some cutting edge issues in the mashup arena, topics that will be (or should be!) discussed at Mashup Camp. The springboard for our conversation will be the question: How do we make mashups easier -- for both developers and enablers?

Uncategorized

Comments (2)

Permalink

The text from the book is now available

While I work on converting the book from QuarkXPress into HTML and XML, I've posted the text of book (in the form of pdfs).    For instance, you can now read the Introduction or Chapter 1 on "Learning from Mashups".

Uncategorized

Comments (0)

Permalink

The cover blurb

One of the fun parts of writing my book was writing the marketing blurb on the back cover of the book.   I often find myself reaching to copy and paste it into emails or other documents when I describe my book.  Here it is:

Pro Web 2.0 Mashups: Remixing Data and Web Services

Dear Reader,

The Web contains thousands of mashups that recombine everything including Google Maps, Flickr, Amazon.com, NASA, the New York Times, and Wikipedia with useful information about travel, finance, real estate, and more. By fusing elements from multiple web sites, mashups are often informative, useful, fun, and even transformative. Mashups also represent the way the Web as a whole
is heading.

By reading this book and working through the examples, you will learn how to create your own mashups; how to exploit such web elements as URLs, tags, and RSS feeds in your mashups; and how to combine APIs and data into mashups. All you need to make full use of this book is basic knowledge of HTML, CSS, and JavaScript, and at least one server-side language (such as PHP, ASP.NET, or Python). By the time you’re finished, you will be able to take almost any source of data on the Web and mash it up with another to create unique and exciting sites of your own.

This book draws from my experiences teaching graduate students and high school students how to create mashups. I describe techniques to analyze and dissect existing mashups so that you can start from first principles, gaining the skills you need to write your own. Believe me, once you start creating mashups and seeing what you can do with them, you won’t want to stop.

Does it make you want to run out to buy a copy of my book?  Let's hope it does!

Uncategorized

Comments (0)

Permalink

lasix surgery savannah ga 3 Month Prescription Accutane Low Dose accutane timeline; symptoms of zoloft working Buy Levitra Online lipitor drug cost! prednisone stopped taking side effects Side Effects From Zoloft difference between lexapro and celexa accutane timeline; What Will Cipro Treat symptoms of zoloft working lipitor drug cost! Accutane Dosage prednisone stopped taking side effects difference between lexapro and celexa Prednisone Side Effects Skin accutane timeline; symptoms of zoloft working Prednisone Dose Pack lipitor drug cost! lipitor is there a generic Zoloft And Alcohol difference between lexapro and celexa accutane timeline; Prednisone Side Effect symptoms of zoloft working lipitor drug cost! Zithromax Antibiotics Online prednisone stopped taking side effects difference between lexapro and celexa Side Effects Lexapro accutane timeline; symptoms of zoloft working Pill Propecia lipitor drug cost! prednisone stopped taking side effects Nexium Overdose difference between lexapro and celexa accutane timeline; Prednisone And Withdrawal Symptoms symptoms of zoloft working lipitor drug cost! Cheapest Generic Levitra

prednisone stopped taking side effects

Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366. Withdrawals From Lexapro accutane timeline; symptoms of zoloft working Cat On Prozac lipitor drug cost! prednisone stopped taking side effects Lexapro Side Affects difference between lexapro and celexa accutane timeline; Effects Of Zoloft symptoms of zoloft working get a prescription for propecia Dangers Of Prozac prednisone stopped taking side effects difference between lexapro and celexa Medicine Side Effects Lipitor accutane timeline; symptoms of zoloft working Substitutes For Lasix lipitor drug cost! lipitor is there a generic Connection Between Zoloft And Hair Loss difference between lexapro and celexa accutane timeline; Cough And Wheezing With Lipitor symptoms of zoloft working lipitor drug cost! Lexapro Cost prednisone stopped taking side effects difference between lexapro and celexa Side Effects Of The Drug Lexapro accutane timeline; symptoms of zoloft working Losing Weight After Stopping Lexapro lipitor drug cost! prednisone stopped taking side effects Accutane Attorneys Southern California difference between lexapro and celexa accutane timeline; Zithromax Dosage symptoms of zoloft working lipitor drug cost! Advertising Campaign Propecia prednisone stopped taking side effects difference between lexapro and celexa Lasix Interlase accutane timeline; symptoms of zoloft working Accutane Buy Online Cheaper lipitor drug cost! prednisone stopped taking side effects Can Zoloft Cause Hair Loss difference between lexapro and celexa accutane timeline; Viagra Cialis Levitra symptoms of zoloft working cipro and std treatment Lipitor 20 Mg prednisone stopped taking side effects difference between lexapro and celexa Side Effects Of Cipro accutane timeline; symptoms of zoloft working Zoloft Side Affects lipitor drug cost! prednisone stopped taking side effects Wellbutrin And Prozac difference between lexapro and celexa accutane timeline; Time For Nexium To Work symptoms of zoloft working lipitor drug cost! Prednisone

prednisone stopped taking side effects

Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366. Zoloft Withdrawl accutane timeline; symptoms of zoloft working Long Term Prednisone Use lipitor drug cost! lipitor is there a generic Accutane Attorney Ohio difference between lexapro and celexa accutane timeline; Nexium Acid Reflux symptoms of zoloft working lipitor drug cost! Alcohol And Zoloft prednisone stopped taking side effects difference between lexapro and celexa Cipro 500mg accutane timeline; symptoms of zoloft working Over The Counter Form Of Zithromax lipitor drug cost! prednisone stopped taking side effects
Robitussin And Clomid
difference between lexapro and celexa clomid with triplets Clomid Ovulation symptoms of zoloft working lipitor drug cost!

Twins On 50 Mg Clomid

prednisone stopped taking side effects Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366. Prednisone Natural Substitute Moonface accutane timeline; symptoms of zoloft working Cheap Levitra lipitor drug cost! lipitor is there a generic Accutane Acne Medication difference between lexapro and celexa accutane timeline; Lipitor Side Effects Liver symptoms of zoloft working lipitor drug cost! Cost Of Clomid prednisone stopped taking side effects difference between lexapro and celexa Weight Loss With Zoloft accutane timeline; symptoms of zoloft working Nolvadex Online lipitor drug cost! prednisone stopped taking side effects Cipro Antibotic difference between lexapro and celexa accutane timeline; Food Affect Nexium symptoms of zoloft working lipitor drug cost! Renogram With Lasix prednisone stopped taking side effects difference between lexapro and celexa Nexium Rebate
accutane timeline;
clomid dosage lutenizing hormone short Vet Dog Care Lasix Medication lipitor drug cost! prednisone stopped taking side effects Ultracet No Prescription difference between lexapro and celexa accutane timeline; Clomid Miscarriages symptoms of zoloft working lipitor drug cost! Lipitor And Als prednisone stopped taking side effects difference between lexapro and celexa Zoloft Zoloft accutane timeline; symptoms of zoloft working Prednisone And Alcohol lipitor drug cost!
prednisone stopped taking side effects
Genuine Levitra No Prescription difference between lexapro and celexa clomid with triplets Prednisone Induced Diabetes symptoms of zoloft working lipitor drug cost!

Nexium Calcium

prednisone stopped taking side effects Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366. Accutane Dry Skin Moisturizer accutane timeline; symptoms of zoloft working Performance Enhancement Prednisone lipitor drug cost! lipitor is there a generic Zoloft Bone Loss difference between lexapro and celexa accutane timeline; Buy Cipro No Prescription symptoms of zoloft working lipitor drug cost! Lasix California prednisone stopped taking side effects difference between lexapro and celexa Lexapro Diabetes accutane timeline; symptoms of zoloft working Class Action Lawsuit On Prednisone lipitor drug cost! prednisone stopped taking side effects Baldness Due To Lipitor difference between lexapro and celexa accutane timeline; Withdrawing From Prednisone symptoms of zoloft working lipitor drug cost! Articles On Prozac prednisone stopped taking side effects difference between lexapro and celexa Prednisone Side Affects accutane timeline; symptoms of zoloft working Prednisone Frequent Urination lipitor drug cost! lipitor is there a generic Does Ultracet Work difference between lexapro and celexa accutane timeline; Zoloft And Breastfeeding symptoms of zoloft working get a prescription for propecia

Effexor Lexapro Taken Together

prednisone stopped taking side effects Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366. Prednisone And Dogs accutane timeline; symptoms of zoloft working Prednisone Dosing lipitor drug cost! prednisone stopped taking side effects Prednisone Withdrawal difference between lexapro and celexa accutane timeline; Cipro Xr Calcium Carbonate Chelating Agent symptoms of zoloft working lipitor drug cost! Discount Levitra Online prednisone stopped taking side effects difference between lexapro and celexa Zoloft For Headaches accutane timeline; symptoms of zoloft working Lipitor Flatulence lipitor drug cost! prednisone stopped taking side effects Lexapro Drug Interactions difference between lexapro and celexa accutane timeline; Prednisone Dosepak symptoms of zoloft working lipitor drug cost! Abruptly Stopping Zoloft

prednisone stopped taking side effects

Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366. Too High Zoloft Dosage accutane timeline; symptoms of zoloft working Cheap Prednisone lipitor drug cost! prednisone stopped taking side effects Accutane Neck Pain Back Head difference between lexapro and celexa accutane timeline; Cipro Xr 1000mg symptoms of zoloft working

lipitor drug cost!

Buying Clomid Online prednisone stopped taking side effects
Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366.
Sexual Side Effect Of Zoloft accutane timeline; clomid dosage lutenizing hormone short Cost Of Zoloft lipitor drug cost! prednisone stopped taking side effects Zoloft Withdrawals Leg Pain difference between lexapro and celexa accutane timeline; Weight Loss While On Lexapro symptoms of zoloft working lipitor drug cost! Lexapro Vs Cymbalta prednisone stopped taking side effects difference between lexapro and celexa Levitra Online accutane timeline; symptoms of zoloft working Online Drug Purchase Levitra lipitor drug cost! prednisone stopped taking side effects Prednisone Withdrawals difference between lexapro and celexa accutane timeline; Levitra Medication symptoms of zoloft working lipitor drug cost! Lexapro Dosage prednisone stopped taking side effects difference between lexapro and celexa Long Term Effects Of Prednisone accutane timeline; symptoms of zoloft working Buy Prozac Online lipitor drug cost! prednisone stopped taking side effects Zoloft And Side Effects difference between lexapro and celexa accutane timeline; Prednisone Effects On Blood symptoms of zoloft working lipitor drug cost!

Accutane Online

prednisone stopped taking side effects Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366. Sabatino Cipro accutane timeline; symptoms of zoloft working Clomid Twins lipitor drug cost! lipitor is there a generic Generic Forms Of Prozac difference between lexapro and celexa accutane timeline; Zoloft Elevated Lfts symptoms of zoloft working lipitor drug cost! Cytotec Without A Prescription prednisone stopped taking side effects difference between lexapro and celexa
What Is Prozac
accutane timeline; clomid dosage lutenizing hormone short Accutane 4 Mg lipitor drug cost!
prednisone stopped taking side effects
Zithromax American Made difference between lexapro and celexa clomid with triplets Side Effects Propecia symptoms of zoloft working lipitor drug cost! Hyponatremia Nexium prednisone stopped taking side effects difference between lexapro and celexa Atlanta Accutane Side Effects accutane timeline; symptoms of zoloft working Medicine Lexapro lipitor drug cost!
prednisone stopped taking side effects
Cheap Propecia difference between lexapro and celexa clomid with triplets Can You Take Zoloft While Pregnant symptoms of zoloft working lipitor drug cost!

Ultracet

prednisone stopped taking side effects

medicine side effects lipitor
Zoloft Wellbutrin accutane timeline; clomid dosage lutenizing hormone short Defferance Betweek Zocor And Lipitor lipitor drug cost! prednisone stopped taking side effects Rogaine Scalp Med Propecia Minoxidil difference between lexapro and celexa accutane timeline; Zithromax Rash symptoms of zoloft working lipitor drug cost! Buy Prednisone prednisone stopped taking side effects difference between lexapro and celexa Is Lexapro Simular To Xanax accutane timeline; symptoms of zoloft working Accutane Lawyers Los Angeles lipitor drug cost! prednisone stopped taking side effects Cipro Neurological Side Effects difference between lexapro and celexa accutane timeline; Lexapro Patient Experiences symptoms of zoloft working lipitor drug cost! Lipitor Problems prednisone stopped taking side effects difference between lexapro and celexa Prednisone Dosage For Cats accutane timeline; symptoms of zoloft working Pregnancy And Zoloft lipitor drug cost! lipitor is there a generic Accutane For Acne difference between lexapro and celexa accutane timeline; Twins Clomid symptoms of zoloft working lipitor drug cost! Clomid For Testosterone Replacement prednisone stopped taking side effects difference between lexapro and celexa Prednisone For Lymphoma accutane timeline; symptoms of zoloft working Prednisone For Canine Lymphoma lipitor drug cost! prednisone stopped taking side effects Lipitor And Alcohol difference between lexapro and celexa accutane timeline; Lexapro Withdrawl Symptom symptoms of zoloft working

lipitor drug cost!

Clomid And Iui prednisone stopped taking side effects Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366. Buspar Zoloft accutane timeline; symptoms of zoloft working Cytotec Safe For Abortion lipitor drug cost! lipitor is there a generic Accutane Statistics difference between lexapro and celexa accutane timeline; Lexapro Medicine symptoms of zoloft working get a prescription for propecia Shelf Life Of Prednisone prednisone stopped taking side effects difference between lexapro and celexa Lexapro 20mg accutane timeline; symptoms of zoloft working Cheap Lexapro lipitor drug cost! prednisone stopped taking side effects Lipitor Lawsuit difference between lexapro and celexa accutane timeline; Rimonabant Side Effects symptoms of zoloft working lipitor drug cost!

Buy Generic Propecia Online

prednisone stopped taking side effects Cough and wheezing with lipitor high dose prednisone and pcp prophylaxis 366. Buy Zoloft Online accutane timeline; symptoms of zoloft working Clomid Day 3 Vs Day 5 lipitor drug cost! prednisone stopped taking side effects Lexapro Abuse difference between lexapro and celexa accutane timeline; Lipitor Unusual Side Effect symptoms of zoloft working cipro and std treatment Nexium Rebates prednisone stopped taking side effects difference between lexapro and celexa Menstruation And Zoloft accutane timeline; symptoms of zoloft working Accutane Side Effects lipitor drug cost! lipitor is there a generic Nolvadex Doctors Testosterone Gel difference between lexapro and celexa accutane timeline; Buy Accutane Online symptoms of zoloft working lipitor drug cost! 13 Dpo Clomid prednisone stopped taking side effects difference between lexapro and celexa Prednisone Rx accutane timeline; symptoms of zoloft working Started Zoloft And Ativan Today lipitor drug cost! lipitor is there a generic Zoloft Dosage difference between lexapro and celexa accutane timeline; Long Term Use Of Prednisone symptoms of zoloft working cipro and std treatment Weight Loss After Zoloft prednisone stopped taking side effects difference between lexapro and celexa Get High Off Zoloft accutane timeline; symptoms of zoloft working Lexapro And Pregnancy
lipitor drug cost!
Lexapro anti depressant manufacturer prednisone ingredients 324. Buy Cheap Amoxil Without Prescription difference between lexapro and celexa accutane timeline; Does Prozac Make You Lose Weight symptoms of zoloft working cipro and std treatment Lexapro Facts prednisone stopped taking side effects difference between lexapro and celexa Amoxil Without Prescription accutane timeline; symptoms of zoloft working Prednisone Delirium Driving Accidents lipitor drug cost!
lipitor is there a generic
Lexapro Vs Celexa difference between lexapro and celexa clomid with triplets Xanax And Prozac symptoms of zoloft working lipitor drug cost! Cipro 500 Mg prednisone stopped taking side effects difference between lexapro and celexa No Prescription Needed Clomid accutane timeline; symptoms of zoloft working Prednisone 20mg Side Effect lipitor drug cost! lipitor is there a generic Is Zoloft An Mao Inhibitor difference between lexapro and celexa accutane timeline; Zoloft Weight Loss symptoms of zoloft working lipitor drug cost! Prednisone Joint Pain prednisone stopped taking side effects difference between lexapro and celexa Prednisone Abuse accutane timeline; symptoms of zoloft working Genox Nolvadex Tamoxifen lipitor drug cost! lipitor is there a generic Cipro Floxin difference between lexapro and celexa accutane timeline; Cytotec Tablets symptoms of zoloft working lipitor drug cost! Zoloft Attorney prednisone stopped taking side effects
difference between lexapro and celexa
Zithromax Used For Treating accutane timeline; clomid dosage lutenizing hormone short Lexapro Weight Gain lipitor drug cost! prednisone stopped taking side effects Zithromax Z Pack difference between lexapro and celexa accutane timeline; Soma Carisoprodol symptoms of zoloft working lipitor drug cost! Lexapro And Weight Gain prednisone stopped taking side effects