#NEWLINE# def get_connection_values( response , **kwargs ) : #NEWLINE# #INDENT# if ( not response ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# access_token = response [ 'access_token' ] #NEWLINE# graph = facebook . GraphAPI ( access_token ) #NEWLINE# profile = graph . get_object ( 'me' ) #NEWLINE# profile_url = ( 'http://facebook.com/profile.php?id=%s' % profile [ 'id' ] ) #NEWLINE# image_url = ( 'http://graph.facebook.com/%s/picture' % profile [ 'id' ] ) #NEWLINE# return dict ( provider_id = config [ 'id' ] , provider_user_id = profile [ 'id' ] , access_token = access_token , secret = None , display_name = profile . get ( 'username' , None ) , full_name = profile . get ( 'name' , None ) , profile_url = profile_url , image_url = image_url , email = profile . get ( 'email' , '' ) )