Skip to main content

Posts

Showing posts from April, 2010

Publicly query facebook using Python

In my cosc lab today a few students were asking about doing something "real" and "cool" with Python, something that isn't easy in excel. After a bit of a think I came to the conclusion that getting data from the internet is a "real" enough problem. As for "cool", since most people seem to have facebook open in the background during labs I thought getting some real live data off facebook could be interesting. First a disclaimer or two. Don't just run random code without reading it and satisfying yourself that its not trying to delete your operating system or do anything sinister!I don't make the test or the assignment. This is not at all related, except for the fact it is using Python (okay it uses a for loop to iterate over a list, if nothing else in this post is of interest to you, learn how to do that!)So if anyone is still reading, let me introduce the problem, then look into how we can solve it. We will take a quick look at faceboo…