Question

I would like to build a customized Facebook page tab for other page owners to instal onto their Facebook pages. Each page tab will need to have its own ID in the links that lead out of the page tab in order for us to track that page activity.

For example each page tab will have a list of products that link to the relevant product pages on an external website. Each of those links will have a unique ID parameter to we can track clicks and purchases. [e.g http://www.mydomain.com/products/product123.aspx?userid=12345]

So I need to create the userid variable in the link. Possibly using GET (or Request.QueryString for asp) to receive from the initial page tab installation.

From what i can see I might be able to use the app_data parameter to pass data over to the page, but when i tried it, it didn't work.

This is what i am using to install the page tabs [https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&app_data=12345]

I thought that this will pass the userid over to the new page tab, but it doesnt seem to work.

If anyone could point me in the right direction i would be very grateful.

Cheers

Was it helpful?

Solution

From what i can see I might be able to use the app_data parameter to pass data over to the page, but when i tried it, it didn't work.

This is what i am using to install the page tabs [https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&app_data=12345]

But you are aware, that appending &app_data=12345 does not mean you will get a GET parameter by the name 'app_data', right …?

The app_data will be passed as a property inside the signed_request parameter – so you’ll have to decode that one, and inside you’ll find your app_data value.

OTHER TIPS

Why does 'each page tab' need to have an ID? The Page ID should be enough for you to determine which content to show (and it's passed to your app on each page load via the signed_request, and the page ID is also passed back to your app in the callback to the pagetab dialog

You could also request manage_pages Permission from the user to determine the list of pages they administer and if your app is installed on each

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top