Files
hermes-mcp/SOCIAL_PUBLISHING_SETUP.md
Garfield a5e4c55885 feat(saas): full SquareMCP SaaS platform v1
- JWT auth with bcrypt password hashing, cookie sessions, forgot/reset password
- Per-user encrypted credential storage (Redis + AES-256-GCM) for all 9 platforms
- Usage tracking with monthly limits per plan (free/starter/growth/enterprise)
- Invoice generation and retrieval (admin + user views)
- Admin panel with customer listing (role-based access)
- Web app UI at app.squaremcp.com — login, dashboard, connections, usage, invoices
- Unified auth middleware: API key, OAuth Bearer, and JWT cookie support
- Facebook Graph API fixes: published_posts endpoint, photo/video post support
- TikTok sandbox compliance: SELF_ONLY privacy for unaudited apps
- URL verification files for TikTok app review
2026-05-13 08:42:33 -04:00

119 lines
2.7 KiB
Markdown

# Social Publishing Setup
This project can publish directly to TikTok and Facebook once the platform credentials are connected.
## Public video asset
The current SquareMCP TikTok master render is intended to be served from:
```text
https://squaremcp.com/squaremcp-tiktok-launch.mp4
```
TikTok and Facebook both use a pull-from-URL style publish flow in Hermes, so the video must be publicly reachable.
## TikTok credentials
Hermes accepts TikTok credentials in either of these forms:
1. Environment variable:
```text
TIKTOK_CLIENT_KEY=...
TIKTOK_CLIENT_SECRET=...
TIKTOK_REDIRECT_URI=https://tiktok.squaremcp.com/auth/tiktok/callback
TIKTOK_DEFAULT_ACCESS_TOKEN=...
```
Login Kit start URL:
```text
https://tiktok.squaremcp.com/auth/tiktok/start
```
Login Kit callback URL:
```text
https://tiktok.squaremcp.com/auth/tiktok/callback
```
2. Per-customer connection:
```bash
curl -X POST https://hermes.squaremcp.com/api/connect/tiktok \
-H 'x-api-key: YOUR_MCP_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"accessToken": "YOUR_TIKTOK_ACCESS_TOKEN"
}'
```
Publish a video:
```bash
curl -X POST https://hermes.squaremcp.com/api/tiktok/video \
-H 'x-api-key: YOUR_MCP_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"video_url": "https://squaremcp.com/squaremcp-tiktok-launch.mp4",
"title": "SquareMCP launch",
"description": "One API key. One workflow layer. #SquareMCP #AITools #Automation"
}'
```
Check publish status:
```bash
curl -X POST https://hermes.squaremcp.com/api/tiktok/video/status \
-H 'x-api-key: YOUR_MCP_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"publish_id": "PUBLISH_ID_FROM_CREATE_VIDEO"
}'
```
## Facebook credentials
Hermes accepts Facebook credentials in either of these forms:
1. Environment variables:
```text
FACEBOOK_DEFAULT_ACCESS_TOKEN=...
FACEBOOK_DEFAULT_PAGE_ID=...
```
2. Per-customer connection:
```bash
curl -X POST https://hermes.squaremcp.com/api/connect/facebook \
-H 'x-api-key: YOUR_MCP_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"accessToken": "YOUR_FACEBOOK_PAGE_ACCESS_TOKEN",
"pageId": "YOUR_FACEBOOK_PAGE_ID"
}'
```
Publish the SquareMCP video to Facebook:
```bash
curl -X POST https://hermes.squaremcp.com/api/facebook/video \
-H 'x-api-key: YOUR_MCP_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"video_url": "https://squaremcp.com/squaremcp-tiktok-launch.mp4",
"description": "SquareMCP launch video. One API key. Real tool access."
}'
```
## Required platform values
TikTok:
- access token with Content Posting API access
Facebook:
- Page access token with `pages_manage_posts`
- Page access token with `pages_read_engagement`
- Page ID