Script that allows batch-downloading a person's full Facebook photo collection if you are the person or if you are friends with that person and have permission to see that person's photos. ### Dependencies * **pytz**: use `easy_install pytz` or `pip install pytz` ## Before you start 1. Read the Facebook [Terms of Service][tos] and the [Developers Policy][policy]. Know that using this for purposes other than to back up your own photo album data is likely less than kosher. I take no responsibility for any damages caused by your use of this example code. 2. See the LICENSE.txt file attached to this gist. ## The USER_ID Depending on the person's profile URL, the `USER_ID` can be a "username" or a raw ID number: http://www.facebook.com/mike.tigas -> **mike.tigas** http://www.facebook.com/profile.php?id=15921791 -> **15921791** ## How to get an access token with the proper permissions for this script. 1. [Create a dummy Facebook app][createapp]. It doesn't have to be called anything fancy. 2. Copy the URL below, and replace `$CLIENT_ID` with your app ID. Browse to the URL and give your application access to your profile data. https://graph.facebook.com/oauth/authorize?client_id=$CLIENT_ID&redirect_uri=http://www.facebook.com/connect/login_success.html&type=user_agent&display=popup&scope=user_photos,friends_photos 3. On the resulting success page, pull out the URL. Get the value for `access_token` and [urldecode][urldecode] it. 4. The resulting value is your `TOKEN`. 5. You might want to look at the [authentication documentation][authdoc] if you're having trouble. [tos]: https://www.facebook.com/terms.php [policy]: https://developers.facebook.com/policy/ [createapp]: https://www.facebook.com/developers/createapp.php [urldecode]: http://meyerweb.com/eric/tools/dencoder/ [authdoc]: https://developers.facebook.com/docs/authentication/