This Node.js application demonstrates the integration with Facebook's Graph API, allowing for the retrieval of user data in a respectful and rate-limited manner. It showcases best practices in handling API rate limits and environmental variables for secure access token storage.
- Fetch user data from Facebook Graph API
- Rate limiting handling with exponential backoff
- Secure token management with
.env
files
- Clone the repository:
git clone https://github.com/KerwinChina/node.js-facebook-meta-api-Graph.git
- Navigate to the project directory:
cd node.js-facebook-meta-api-Graph
- Install dependencies:
npm install
- Create a
.env
file in the root directory and add your Facebook Access Token:
FACEBOOK_ACCESS_TOKEN=YourAccessTokenHere
- Run the application:
npm install -g typescript
npm install --save-dev @types/node
npx ts-node index.ts
- FACEBOOK_ACCESS_TOKEN: Your Facebook Graph API access token. Obtain one through Facebook Developer Console.
For more information on Facebook Graph API, visit Facebook Graph API Documentation.
This project is licensed under the MIT License - see the LICENSE file for details.