views:

18

answers:

1

I am currently using this recently written tutorial on authorizing an application with facebook using auth 2.0 and it works. the application authorizes correctly and uses the GraphAPI.

http://kartiklad.com/oauth-2-0-and-graph-api-for-facebook-canvas-applications/

But the problem is using the IFrame with a multi page website and this method of authentication, each time a different page is called, it has to go back to authentication page which will redirect the user page to the application, which makes it impossible to pass variables using $_GET.

So how would anyone else here suggest passing variables from one page to the next in an iframe?

This is probably not needed by the application I am working on is at : http://apps.facebook.com/prtrackevents/

+1  A: 

The problem is that your urls are only navigating within the frame. The authentication of facebook is including your session variables inside a ?session=... query tag on your frame so that when you navigate to a url in your iframe you loose the ?session querystring value so then your app has to re authenticate. The fix is that your links must include target="_top" so that they cause the entire page to change positions. For example, your details link should be like this:

<a href="http://apps.facebook.com/prtrackevents/?page=&amp;command=showevent&amp;option=10&amp;email=&amp;name=&amp;image=" target="_top">Details</a>
Nathan Totten