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 Authorization header, or the invite hash this endpoint accepts in place of one.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://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 hash instead.

  • Use a bearer token (scoped by an ownership check).

  • OR use an invite hash (no token) whose encoded store must own store_review_site_id.

Rate limit

  • 30 requests/min per IP (public).

Request body

FieldTypeRequiredDescription
store_review_site_idintegerRequiredMust exist; caller scope (an ownership check) unless using hash.
fb_tokenstring (≤2000)RequiredLong-lived user access token.
fbpage_access_tokenstring (≤2000)RequiredPage access token.
fbpage_idstring (≤255)RequiredFacebook page id.
urlurl (5–2000)RequiredFacebook page URL → review_site_url + landing_page_url.
scopesarrayOptionalGranted OAuth scopes.
fbpage_namestring (≤255)OptionalFacebook page display name, recorded with the connection event.
landing_page_urlurl (5–2000)OptionalAccepted; the page url is used for the landing page.
hashstringOptionalInvite 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

{
  "data": {
    "status": "success",
    "message": "The review site has been connected!"
  }
}

400 Page already linked · 400

{
  "message": "Bad Request",
  "status": "error",
  "errors": "The page is already linked to other places. Please connect another Facebook page."
}

Errors

StatusMeaning
400Page already linked
401The bearer token is missing, expired or invalid
422The request failed validation — the response names the fields
500Unexpected 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"]}'

Did this page help you?