News for hackers. Stuff that matters.
Re:Review our new social game, theWorldChat: Chat using your... by blhack on Thursday December 02, 2010 @05:19PM (#1963902)
It shouldn't be too much of a pain to do. I do something like this on http://thingist.com (Not caching facebook photos, caching the randomly generated 3x3 pictures that it gives you if you don't connect with facebook [the script to generate the pictures is expensive])

The python to do it would look something like this:

def cache_fb_photo(fb_uid,cache_name):

     import urllib
     import time

     request = urllib.urlopen("https://graph.facebook.com/%s/picture" % (fb_uid))

     photo = request.read()

     photo_location = "/path/to/photo/cache/cache_name"
     cached_photo = open(photo_location, "w")
     cached_photo.write(photo)
     cached_photo.close()

This may or may not violate facebook's ToS. Obviously it would take more than this to actually put it into production, but this would kindof work.

There are no comments on this comment yet.