I'm creating an IFrame app which users can add to a Pages Tab. When I'm navigating to a page where the app is added as a tab ( next to wall,info, etc ) , I see that the Facebook servers call my server where the application sits, with a POST request, but not passing any additional info.
How can my app get more information at that moment to see what Page is being accessed by the visitor ( what is the page id / name ) , so I know what to render back to Facebook ?
I've seen the Graffiti app doing this, when you navigate to a page with graffit开发者_如何学运维i in a tab, it knows what images to display.
Ok, got it working.
I had to enable OAuth 2.0 for Canvas (beta) under the Advanced tab on the application settings page. By having this enabled I am now receiving a "signed_request" param in the Post request.
http://developers.facebook.com/docs/authentication/canvas
After decoding this I can get the profile_id which is the page id in the visitor's browser.
精彩评论