Tippu
Tippu

Reputation: 1261

Facebook browser refresh takes to the home page

I am creating a facebook application using ASP.NET.

When the user click the browser refresh, the application is taken back to the home page. is there any way to refresh the page users are in.

for example when user launch application, user's url is http://app.facebook.com/appname/default.aspx

when user clicks a button and moved to page2.aspx the url still remain the http://app.facebook.com/appname/default.aspx, so when user refresh the page it takes them to default.aspx, but I am looking for a way to take the users to page2.aspx.

Thanks

Upvotes: 0

Views: 299

Answers (3)

ShawnDaGeek
ShawnDaGeek

Reputation: 4150

instead of setting canvas URL to a file in the canvas settings, set it to a directory.

example:

http://apps.facebook.com/appname/ will allow the canvas to browse all files in directories

http://apps.facebook.com/appname/default.aspx will limit the canvas to the file only.

Upvotes: 0

Jimmy Sawczuk
Jimmy Sawczuk

Reputation: 13614

The best way I can think to do this is to store the user's current page in a session, and if a refresh is detected, simply redirect them to that page. Not a whole lot else you can do about that, unfortunately, and most Facebook apps simply ignore the issue.

Upvotes: 1

millebii
millebii

Reputation: 1287

I'm afraid this will not be possible, because of the Same Origin Policy. The canvas runs in an <iframe> from a different domain than FB domain.
So the SOP makes it that the inner iframe can not send events to the master page and especially not changing its url or even read it.

But if someone has a tip, I'm happy to know about it.

Upvotes: 1

Related Questions