The old “http://www.facebook.com/add.php” allowed to select a page when showing the Add Page Tab Dialog, so the application could show a list of pages and add the application tab to each page individually.
How can I do the same thing using the new Add Page Tab Dialog? I can show the add dialog but not with a selected page. I tried it with the following code:
var obj = {
method: 'pagetab',
page: page_id,
pages: 1
};
FB.ui(obj);
Is there any way to acomplish this with the javascript dialog popup?
UPDATE
Here is my scenario: My facebook application has two types of visitors: the page admins that want to add my application to a page, and the page visitors who use my application inside a tab.
The page admin uses the canvas version of my application to manage all his pages. He may select one of the pages (even one without a tab) inside my application and perform configuration tasks. When we used the old add.php dialog, we could show the user a button to add the tab directly to the currently selected page. I wanted to accomplish the same behaviour using the Add Page Tab Dialog.
How can I pre-select pages with the Add Page Tab Dialog? You can’t.
Not sure why you want this feature. If you are the admin, then just select the page you want and same thing will apply to whoever is going to add your app.
One more note, you could always remove your app from a specific page by issuing an HTTP DELETE request to
/PAGE_ID/tabs/TAB_IDobject with a Page Access Token. reference.