A modern API built using Cloudflare Workers, Hono framework, and GraphQL Yoga. This project provides a scalable and efficient way to create serverless APIs with GraphQL support.
- Facebook Page information retrieval
- Detailed page statistics (followers, follows, media counts)
- Media posts with engagement metrics
- Stories with performance analytics
- Built on serverless architecture
- Basic page information
- Links to detailed page data
- Comprehensive page statistics
- Profile information
- Media collection
- Stories collection
- Post details
- Engagement metrics (likes, comments, shares)
- Performance metrics (reach, saves)
- Media content information
- Story content
- Engagement metrics
- Performance analytics
- Cloudflare Workers - Serverless platform
- Hono - Lightweight web framework
- GraphQL Yoga - Fully-featured GraphQL Server
- TypeScript - Type safety and modern JavaScript features
- Node.js (v16 or later)
- Cloudflare account
- Wrangler CLI
- Clone the repository:
git clone https://github.com/yourusername/your-project-name.git
cd your-project-name
- Install dependencies:
npm install
-
Configure Wrangler: Create or modify
wrangler.tomlwith your project settings. -
Start the development server:
npm run dev
- Deploy to Cloudflare Workers:
npm run deploy
- Create info.ts
export const TOKEN = "your_facebook_graph_api_token"
export const URL = "https://graph.facebook.com/v21.0"
├── src/
│ ├── index.ts # Main application entry
│ ├── graphql/
│ │ ├── type.ts # GraphQL type definitions
│ │ └── resolver.ts # GraphQL resolvers
│ └── ...
├── wrangler.toml # Cloudflare Workers configuration
└── package.json