退出 Flickr 后,IFRAME 中的图像不再显示?
我有一个 iframe 窗口,显示用户的 flickr 图像。我使用 flickr.photos.search api 从 flickr 下载用户的图像。当用户登录 flickr 时,这非常有效。
但是,当我明确从 flickr 和 yahoo 网络注销用户,然后尝试下载 flickr 图像时,我会在完整的浏览器窗口中(而不是在我的 iframe 中)重定向到 www.yahoo.com。
如果我没记错的话,当我不使用 iframe 并且我被重定向到 yahoo 登录屏幕时,我没有遇到此问题。
有什么建议吗?
详细来说,此 URI - http://www.flickr.com/ services/api/auth.howto.web.html,列出了以下步骤 -
- 创建身份验证处理程序
当用户关注您的登录 URL 时,他们将被定向到 flickr.com 上的页面,该页面询问他们是否想要授权您的申请。此页面显示您的应用程序标题和说明以及徽标(如果您上传了徽标)。
当用户接受请求时,他们将被发送回您在步骤 2 中定义的回调 URL。该 URL 将添加一个 frob 参数。例如,如果您的回调 URL 为 http://test.com/auth.php 那么用户可能会被重定向到 http://test.com/auth.php?frob=185- 837403740(本例中的 frob 值为“185-837403740”)。
当我在 iframe 窗口中时不会发生这种情况,但在完整的浏览器窗口中却会发生这种情况。
I have a iframe window which displays user's flickr images. I use the flickr.photos.search api to download the user's image from flickr. This works great when the user is logged into flickr.
But when I explicitly log off the user from flickr and the yahoo network and then attempt to download the flickr images, I get redirected to www.yahoo.com in a full browser window (not in my iframe).
If I remember correctly, I did not have this issue when I was not using iframes and I was being redirected to the yahoo login screen.
Any suggestions?
To elaborate, this URI - http://www.flickr.com/services/api/auth.howto.web.html, lists the below step -
- Create an auth handler
When users follow your login url, they are directed to a page on flickr.com which asks them if they want to authorize your application. This page displays your application title and description along with the logo, if you uploaded one.
When the user accepts the request, they are sent back to the Callback URL you defined in step 2. The URL will have a frob parameter added to it. For example, if your Callback URL was http://test.com/auth.php then the user might be redirected to http://test.com/auth.php?frob=185-837403740 (The frob value in this example is '185-837403740').
This does not happen when I am in my iframe window but it does happen in my full browser window.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 flickr 论坛上发布了上述问题,收到回复说这不能在 iframe 中完成。因此,我需要重新调整我的用户界面才能实现这一目标。
I posted the above question in the flickr forums and I received a response which said this cannot be done in iframes. So, I would need to rejig my UI to achieve this.