Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewdarnall/meta-graph-api
META graph API scraper with tutorial of API usage
https://github.com/andrewdarnall/meta-graph-api
machine-learning metaapi python scraping social-network-analysis unict-dmi-appunti
Last synced: 25 days ago
JSON representation
META graph API scraper with tutorial of API usage
- Host: GitHub
- URL: https://github.com/andrewdarnall/meta-graph-api
- Owner: AndrewDarnall
- Created: 2022-12-11T15:54:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-14T22:13:52.000Z (4 months ago)
- Last Synced: 2025-01-20T21:57:52.550Z (25 days ago)
- Topics: machine-learning, metaapi, python, scraping, social-network-analysis, unict-dmi-appunti
- Language: Python
- Homepage:
- Size: 9.89 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# META Graph API Scraper
In the age of Artificial Intelligence and Big Data, social networks represent a valuable source of data, often regarded as a goldmine. This is a key reason why most social media APIs, particularly following the transformative launch of ChatGPT, have been restricted to use by specially authorized individuals.
This repository contains my Python implementation of a public data scraper for the META Graph API, specifically designed for the Facebook platform. It is limited to accessing data from public Facebook accounts only.
Additionally, I have conducted a basic sentiment analysis on the collected posts and provided a detailed explanation of the API's functionality in a Jupyter notebook.
------
## Dependencies
| Component | Version |
------------|----------
| Python | `3.9` |
| pip | `24.0` |------
## Directory Structure
```bash
├── facebook_public_scraper
│ ├── main.py
│ ├── requirements.txt
│ ├── scraper.py
│ └── utils.py
├── Meta_Graph_API_tutorial
│ ├── Facebook Graph API tutorial.pdf
│ ├── META-sentiment-analysis.ipynb
│ └── README.md
└── README.md
```------
## Usage
Clone the repo
```bash
git clone https://github.com/AndrewDarnall/META-Graph-API-Scraper.git
cd META-Graph-API-Scraper
```Setup the dependencies
```bash
cd facebook_scraper
python -m pip install -r requirements.txt
```Create a target file with a list of public facebook pages, usually you would call it `target.txt`
```bash
touch targets.txt
echo "NintendoAmerica" >> targets.txt
```Run the scraper
```bash
python main.py targets.txt
```Once finished, the scraper will have created in the current working directory `facebook_public_scraper` a directory, written in
capital characters, of each scraped public page.
Each directory contains images, text and raw .json of the scraped page's posts