<jupyter_start><jupyter_text>**Facebook API: Getting Data with Facebook's Graph API using Python** Link: https://developers.facebook.com/docs/graph-api/ Getting Facebook API Key (5 Step Process): https://developers.facebook.com/docs/pages/getting-started/ Creating a Facebook for Developers account steps: https://elfsight.com/blog/2017/10/how-to-get-facebook-access-token/ Facebook Python API: https://pypi.org/project/python-facebook-api/ Towards Data Science Facebook Python API: https://towardsdatascience.com/how-to-use-facebook-graph-api-and-extract-data-using-python-1839e19d6999<jupyter_code>import sys
import config_facebook

print(config_facebook)

FACEBOOK_TOKEN = config_facebook.access_token
USER_AGENT = "Jake_Schneider"
import pyfacebook

api = pyfacebook.Api(long_term_token="FACEBOOK_TOKEN")
api.get_token_info(return_json=True)
import requests 
import urllib3 
import facebook
graph = facebook.GraphAPI(access_token=FACEBOOK_TOKEN, version = 2.7)
#events = graph.request(‘/search?q=Poetry&type=event&limit=10000’)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11404335532516494, 'fraction_numerical': 0.0235626767200754, 'mean_word_length': 6.866666666666666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '75671', 'license': 'MIT', 'n_tokens_mistral': 365, 'n_tokens_neox': 341, 'n_words': 64, 'path': 'API/Facebook API/facebook_api.ipynb', 'repo_name': 'jschneids13/CS109a-Group-81-Final-Project', 'size': '1061'}