示例#1
0
def facebook_graph(self):
    """ 
    Facebook graph for a specific user. 
    """
    
    data = urllib.urlopen('%s' % utils.graph_api_url('me', self, token=True))
    results = json.load(data)
    return results
示例#2
0
def facebook_picture(self, size):
    """
    Facebook profile picture.

    Retrieve user's Facebook profile image. Sizes include "square" (50x50),
    "small" (50 pixels wide, variable height), "normal" (100 pixels wide,
    variable height) and "large" (200 pixels wide, variable height). 
    """
    
    results = '%s?type=%s' % (utils.graph_api_url('%s/picture' % self), size)
    return results