开发者

Link to a facebook application from a facebook page does not work?

开发者 https://www.devze.com 2023-02-24 11:43 出处:网络
I have a ready facebook application that should be linked to a facebook page. I am trying to link the canvas url of my application to a button in the page with the help of javascript by calling:

I have a ready facebook application that should be linked to a facebook page. I am trying to link the canvas url of my application to a button in the page with the help of javascript by calling:

function onBtnClick() { window.location = "http://apps.facebook.com/CANVAS_URL/"; } 

When I click the button that is supposed to take me to the app I get only an empty page with a blue开发者_开发知识库 box and "Facebook" string inside it (pretty much looking like the facebook logo)

This box is a link to my application and if clicked takes me to http://apps.facebook.com/CANVAS_URL/

The same problem occurs in the application, where I try to link the facebook page. The link there is a regular <a> tag.

Do you have any ideas how to redirect to an app without this additional "Facebook" page?

Thanks in advance,

Martin


Use this instead:

top.location.href = "http://apps.facebook.com/CANVAS_URL/";

You need the upper frame (Facebook) to redirect.


If using a simple <a> html link, try target="_top"

0

精彩评论

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