tags:

views:

14

answers:

1

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 graffiti in a tab, it knows what images to display.

A: 

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.

Dexter Morgan
Make sure you are validating that information using your secret key and the sig is provided. If you don't do this, you are leaving your app open to a very big security vulnerability. If you use the PHP SDK or any of the other SDKs they will take care of this for you. What language are you developing with?
Nathan Totten
Nathan - I'm using c# (asp.net mvc) . I now see you have a project on codeplex ( http://facebooksdk.codeplex.com/ ) . I'll take a look and see how I can make a use of that
Dexter Morgan

related questions