Facebook recently announced they are allowing page apps to be run through an iFrame, so I thought I would give it a go. Everything was quite self explanatory, except I could not receive any parameters from Facebook, including the signed request !
After pulling my hair out for a few hours, here is the solution I came up with, hopefully it will save you all a bit of time.
1. On your app settings under Facebook Integration->Page Tabs, make sure Tab URL ends with your file name and not just the folder directory. For example you should enter http://mysite.com/fbtab/index.php
2. Ensure your page is upgraded to the new facebook page style. You can do this at here.
3. You need to enable OAuth and Post for Canvas under your app settings at the Advanced section.
4. To get the actual params you will need to do a little php work.
$signed_request = $_REQUEST["signed_request"]; list($encoded_sig, $payload) = explode('.', $signed_request, 2); $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true); echo $data['user_id'];