Facebook sdk v4

Hi,
I am creating my first Facebook php canvas app on Heroku  platform(Which is a great platform by the way).
I upgraded facebook template to latest Facebook php sdk (v4).
Please check.
I hope this code will be useful to somebody else.
Upgraded template works great. 

***Couple of issue need to addressed.***
- FB Canvas does not reload new credential, when a user login via javascript fbsdk.
- New FB SDK doe not provide app name for the fb appid, unless a valid user session available.
- Fluid canvas support done in a hackish way, which can be improved.