Heroku运行预制的Facebook应用程序时无限循环

时间:2012-06-09 17:34:43

标签: facebook heroku

如果您注册Facebook应用程序并使用Heroku的服务,它将为您生成一个示例应用程序,因为从几天前,无限循环发生,您无法与您的应用程序进行交互。我试图替换window.location = window.location; window.top.location.href =“https://apps.facebook.com/xxxxxx”:

//Listen to the auth.login which will be called when the user logs in
//using the Login button
FB.Event.subscribe('auth.login', function(response) {
// We want to reload the page now so PHP can read the cookie that the
// Javascript SDK sat. But we don't want to use
// window.location.reload() because if this is in a canvas there was a
// post made to this page and a reload will trigger a message to the
// user asking if they want to send data again.
//window.location = window.location;
window.top.location.href = "https://apps.facebook.com/YOUR_APPs_NAMESPACE"
});

幸运的是,它解决了这个问题。只是在这里分享。

0 个答案:

没有答案
相关问题