<commit_before># @author <NAME>

import facebook3 as fb 
# the content of this repository: https://github.com/tuanchauict/facebook-sdk-python3
# that have been added to the site-packages folder of anaconda


oauth_access_token = open('../ressources/accessToken.txt').read()



graph = fb.GraphAPI(oauth_access_token)
profile = graph.get_object("me")
friends = graph.get_connections("me", "friends")

print(friends)
#graph.put_object("me", "feed", message="I am writing on my wall!")
<commit_msg>Some error handling, and more tinkering.<commit_after># @author <NAME>

import facebook3 as fb
import sys 
# the content of this repository: https://github.com/tuanchauict/facebook-sdk-python3
# that have been added to the site-packages folder of anaconda


# add error message in case of missing file or bad token!
oauth_access_token = open('../ressources/accessToken.txt').read()



graph = fb.GraphAPI(oauth_access_token)

friends = {}

try:
    some_friends = graph.get_connections("me", "friends")
    print(some_friends)
except:
    print("Unexpected error:",  sys.exc_info()[0])


#print(graph.fetch_url(some_friends['paging']['next']))

#print(graph.get_connections("me", some_friends['data'][0]["id"]))



# now i need a method to fill the friends dictionary
    # get the sex
    # get the likes


# another to save the dictionary



#profile = graph.get_object("me")
#graph.put_object("me", "feed", message="I am writing on my wall!")

{'fraction_non_alphanumeric': 0.13324080499653018, 'fraction_numerical': 0.004163775156141568, 'mean_word_length': 5.03347280334728, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1405239', 'n_tokens_mistral': 481, 'n_tokens_neox': 451, 'n_words': 130}