'Uploads an image using multipart/form-data
image=File like object for the image
message=Caption for your image
album_id=None posts to /me/photos which uses or creates and uses
an album for your application.'

def put_photo(self, image, message=None, album_id=None, **kwargs):

    object_id = (album_id or 'me')
    post_args = {'access_token': self.access_token, 'source': image, 'message': message}
    post_args.update(kwargs)
    (content_type, body) = self._encode_multipart_form(post_args)
    req = urllib2.Request(('https://graph.facebook.com/%s/photos' % object_id), data=body)
    req.add_header('Content-Type', content_type)
    try:
        data = urllib2.urlopen(req).read()
    except urllib2.HTTPError as e:
        data = e.read()
    try:
        response = _parse_json(data)
        if (response and isinstance(response, dict) and response.get('error')):
            raise GraphAPIError(response['error'].get('code', 1), response['error']['message'])
    except ValueError:
        response = data
    return response
