Created
February 3, 2015 21:27
-
-
Save kalda341/d18968a31ad5c2a9f8e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Facbook: | |
def __init__(self, token): | |
self.token = token | |
self.graph = facebook.GraphAPI(token) | |
self.profile = self.graph.get_object("me") | |
def get_friends(self): | |
friends = self.graph.get_connections("me", "friends") | |
# To extract names | |
# friend_list = [friend['name'] for friend in friends['data']] | |
return friends | |
class Application: | |
def __init__(self, config): | |
facebook = Facebook(config.get('token')) | |
UI(facebook) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment