If you are a fan of The Elbi Files, you can download the posts on the page using the procedure described here. I am using Ubuntu 12.04.
- Install pip[1].
- Configure and activate facebookenv virtual environment[2].
- Install requests package while in facebookenv environment: pip install requests
- Get an access token using Facebook's Graph API Explorer tool[3].
- Download the Python file below. Make sure you change the access token to the one you obtained from step 4.
- Run the script on the terminal and redirect the output to a file: PYTHONIOENCODING=UTF-8 python elbifiles.py > elbifiles.txt
- Note that the script downloads the messages only. Facebook however allows you to download more! Use responsibly. Now do some "interesting" text processing on the text file!
Resources:
[1] http://www.saltycrane.com/blog/2010/02/how-install-pip-ubuntu/
[2] http://facebook-sdk.readthedocs.org/en/latest/install.html
[3] https://developers.facebook.com/tools/explorer
1 comments:
I'm pretty sure there are Python libraries that automatically generates your fb access token just by giving it, as parameters, your app id and app secret. Rather than copy-pasting from the api explorer. But first create your facebook app (https://developers.facebook.com/) :P
Post a Comment