Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find out Page Tab URL from Page ID and application ID

Tags:

url

facebook

I'm building a Facebook app that can be installed on Pages (a Page Tab app), and would like to redirect my users to their Page Tabs, knowing only the app ID, and the Page ID.

Let's say for example that my app is installed on this page: http://www.facebook.com/coldplay whose ID is 15253175252, and my app ID is 174314562666399.

I know I can access the Page using only its numerical ID: http://facebook.com/15253175252 redirects to the Coldplay page.

And I can access the Page Tab with this URL: http://www.facebook.com/coldplay/app_174314562666399. Is there a way to get Facebook to redirect me to this Page Tab using only the Page ID and app ID?

like image 380
julien_c Avatar asked Mar 06 '12 14:03

julien_c


People also ask

How do I find the page ID for my pages?

To view your page IDs, click on Pages > All Pages within your WordPress menu. Here, you will immediately see that an extra ID column has been added to your Pages menu, displaying the ID for each of your pages.

How to get page title from page id and Application ID?

There is a built-in substitution string APP_PAGE_ID and APP_ID, so you could do this in your page to use the current page ID and application ID to get the page title: select PAGE_TITLE from APEX_050000.APEX_APPLICATION_PAGES where PAGE_ID = :APP_PAGE_ID and APPLICATION_ID = :APP_ID;

How do I Find my site’s content IDs?

Using a WordPress plugin to help you to find your site’s content IDs can be a useful option if you want your page IDs or post IDs all displayed together within your admin menus. This will save you the time and effort involved in switching in and out of editors, as is necessary in the first method that we discussed.

How do I find the URL of a website I visit?

Alternatively, you can check the URL of any website you are visiting by clicking the address bar in your web browser. The address bar is the long white bar at the top of your web browser, below the tabs at the top.


1 Answers

You can pass in the APP ID with the sk=app_app_id parameter, but you'll lose it when using the Page ID instead of the Pagename - it's not redirected along with the request.

There's a workaround I've used before though: you'll need to write a FB redirect proof URL from the information you have.

So:

http://facebook.com/pages/-/15253175252?sk=app_174314562666399

That is:

http://facebook.com/pages/-/[page_id]?sk=app_[app_id]

like image 182
steve Avatar answered Sep 21 '22 02:09

steve