如果您注册一个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"
});
Run Code Online (Sandbox Code Playgroud)
幸运的是,它解决了这个问题.只是在这里分享.
| 归档时间: |
|
| 查看次数: |
781 次 |
| 最近记录: |