Facebook — connect page to review site
Overview
Connect a Facebook page to a store review site. Guards against a page already linked elsewhere. Saves the page token + id, sets sendto_scrapper=Y, url_status=enable, connection_status=connected. Stores the FB user token on the company if not already set; and deletes prior response rows if the page changed. Emits audit STORE_REVIEW_SITE_OAUTH_CONNECTED.
Prerequisites
- Either a bearer token in the
Authorizationheader, or the invitehashthis endpoint accepts in place of one.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/facebook/review-site/connect
Authentication
-
A bearer token is optional here. Send one to act as a signed-in user, or supply the documented
hashinstead. -
Use a bearer token (scoped by an ownership check).
-
OR use an invite
hash(no token) whose encoded store must ownstore_review_site_id.
Rate limit
- 30 requests/min per IP (public).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
store_review_site_id | integer | Required | Must exist; caller scope (an ownership check) unless using hash. |
fb_token | string (≤2000) | Required | Long-lived user access token. |
fbpage_access_token | string (≤2000) | Required | Page access token. |
fbpage_id | string (≤255) | Required | Facebook page id. |
url | url (5–2000) | Required | Facebook page URL → review_site_url + landing_page_url. |
scopes | array | Optional | Granted OAuth scopes. |
fbpage_name | string (≤255) | Optional | Facebook page display name, recorded with the connection event. |
landing_page_url | url (5–2000) | Optional | Accepted; the page url is used for the landing page. |
hash | string | Optional | Invite hash [store_id, 15]; grants access without a token, must match the row's store. |
{
"store_review_site_id": "<storeReviewSiteId>",
"fb_token": "EAABsbCS...userToken",
"fbpage_access_token": "EAABsbCS...pageToken",
"fbpage_id": "123456789",
"url": "https://www.facebook.com/YourBusinessPage",
"scopes": [
"pages_show_list",
"pages_read_engagement"
]
}How it works
- 200 on connect. 400 if the page is already linked to another place.
Response
200 OK · 200
200{
"data": {
"status": "success",
"message": "The review site has been connected!"
}
}400 Page already linked · 400
400{
"message": "Bad Request",
"status": "error",
"errors": "The page is already linked to other places. Please connect another Facebook page."
}Errors
| Status | Meaning |
|---|---|
400 | Page already linked |
401 | The bearer token is missing, expired or invalid |
422 | The request failed validation — the response names the fields |
500 | Unexpected server error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/facebook/review-site/connect" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"store_review_site_id": "<storeReviewSiteId>", "fb_token": "EAABsbCS...userToken", "fbpage_access_token": "EAABsbCS...pageToken", "fbpage_id": "123456789", "url": "https://www.facebook.com/YourBusinessPage", "scopes": ["pages_show_list", "pages_read_engagement"]}'Updated 9 days ago
Did this page help you?
