Ask Your Question
3

Does a Graph API exist to find the page id of a public page so that it can be used while publishing a post with @mentions?

asked 2022-10-09 11:00:00 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-12-21 02:00:00 +0000

plato gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-10-09 11:00:00 +0000

Seen: 7 times

Last updated: Dec 21 '22