Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, the Graph API allows you to find the page ID of a public page by querying the Facebook Pages API. You can use the following endpoint to search for a page by name:

https://graph.facebook.com/v12.0/search?q=<PAGE_NAME>&type=page&access_token=<ACCESS_TOKEN>

Replace <PAGE_NAME> with the name of the public page you're searching for, and <ACCESS_TOKEN> with a valid access token for your app. The response will include a list of pages that match the query, along with their ID, name, and other metadata.

Once you have the page ID, you can use it in a post with @mentions by using the following format:

@[page_id:page_name]

Replace <page_id> with the actual page ID you retrieved from the Pages API, and <page_name> with the name of the page as you want it to appear in the post.