开发者

Facebook Application and URLs

开发者 https://www.devze.com 2023-03-26 19:30 出处:网络
I developed a Facebook application using Ruby on Rails but I have a slightly annoying problem. When I click any URL inside the application the application redirects to the correct view and everything

I developed a Facebook application using Ruby on Rails but I have a slightly annoying problem.

When I click any URL inside the application the application redirects to the correct view and everything is working just fine but the URL on the browser is not updating accordingly. The problem is that if I click refresh on the page I will be redirected to the home page of the directory ( that's correct because the URL in the browser is the home URL ) instead of the page that I was.

Exampl开发者_Python百科e:

App URL:

https://apps.facebook.com/example

Clicking the books link is showing the page correctly but not modifying the browser's URL to:

https://apps.facebook.com/example/books

So next time that I will hit refresh I will be redirected to the home page because the browser link is still:

https://apps.facebook.com/example 

Any suggestions?


you need to be aware that your app is an iframe app(i assume you didnt use FBML), that means it is contained in a iframe. So when you create your links, add a target=_top will change the url.


When You create a link You must define target with _parent like:

<a href="link" target="_parent">link</a>
0

精彩评论

暂无评论...
验证码 换一张
取 消