connect
List Facebook pages
Returns all Facebook pages the connected account has access to, including the currently selected page.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
accountIdstring
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.getFacebookPages({ path: { accountId: 'account_abc123', },});console.log(data);{
"pages": [
{
"id": "123456789012345",
"name": "My Brand Page",
"username": "mybrand",
"category": "Brand",
"fan_count": 5000
},
{
"id": "234567890123456",
"name": "My Other Page",
"username": "myotherpage",
"category": "Business",
"fan_count": 1200
}
],
"selectedPageId": "123456789012345",
"cached": true
}{
"error": "Unauthorized"
}Empty