facebook页面添加tab后的回调
对于我正在开发的应用程序,我需要代表用户向页面添加一个选项卡(与他们进行一些交互)。
现在我能找到的唯一方法是重定向到 http://www.facebook.com /add.php?api_key=APIKEY&pages=1&page=PAGEID&next=something
我需要 facebook 的一些反馈,说明页面已添加 - 我认为下一个参数会导致重定向,但事实并非如此t。我还想尝试打开一个新窗口或使用 iframe 来执行此操作,并监听 url 的更改,但我无法监听跨域事件。
我是否还可以寻找其他方法来检测此更改,或者以完全不同的方式向页面添加选项卡,或者我是否需要添加某种“身份验证后单击此处”按钮?
谢谢!
For an application I am working on, I need to add a tab to a page on behalf of the user (with a bit of interaction from them).
Right now the only way I could find to do this is a redirect to
http://www.facebook.com/add.php?api_key=APIKEY&pages=1&page=PAGEID&next=something
I need some feedback from facebook saying the page has been added - I thought the next parameter would cause a redirect but it doesn't. I also wanted to try opening a new window or using an iframe to do this in, and listen for the url to change, but I can't listen for cross-domain events.
Is there anything else I could look for to do detect this change, or an entirely different way to add tabs to pages, or am I going to need to add some kind of "click here after you authenticate" button?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过为您的应用程序设置 post_authorize_redirect_url 来完成此操作。每次有人授权您的应用程序时都会调用该 URL,并且他们的个人资料 ID 包含在调用中。 这里是一些详细信息。
You can do this by setting a post_authorize_redirect_url for your app. That url will get called every time someone authorizes your app and their profile id is included in the call. Here are some details.