使用 flickr API 添加照片集
是否可以使用 flickr API 创建照片集? 我还没有找到任何示例代码来实现此目的,但是您可以在 flickr 网站上完成此操作,并且我想 flickr 在其网站内部使用该 API?
丹尼斯
Is it possible to create a photo collection using the flickr API?
I haven't found any example code to achieve this, however you CAN do it on the flickr website, and i suppose flickr uses the API internally for their site?
Dennis
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这可能已经太晚了,无法提供帮助,但是,我想我应该在这里为后代发布解决方案(因为在我发现它之前我正在谷歌搜索答案时出现了这篇文章)。
该方法在 Flickr API 中没有记录,但它似乎确实有效(通过 REST 接口测试)。
方法为: flickr.collections.create
必需参数:
可选参数:
我通过在 Flickr Web 界面中创建集合并检查 POST 时启用 Firebug 控制台找到了该方法。我不知道 auth_hash 和 cb 指的是什么,但是,我假设使用 JavaScript 接口而不是 REST 时需要它们。
通过检查在 Web 界面中执行操作后立即发生的 POST,可以对 Flickr 上使用 JavaScript 界面的任何内容进行逆向工程。
This may be too late to help but, I thought I'd post the solution here for posterity (as this post came up while i was google'ing for the answer before i discovered it).
The method is undocumented in the Flickr API but, it does seem to work (tested via the REST interface).
The method is: flickr.collections.create
Required parameters:
Optional parameters:
I found the method by enabling Firebug's console while creating a collection in the Flickr web interface and examining the POST. I have no idea what auth_hash nor cb refer to but, I would assume that they are required while using the JavaScript interface as opposed to REST.
Anything that uses the JavaScript interface on Flickr can be reverse engineered by examining the POST that occurs immediately after you take the action in the web interface.
由于某种原因,对 Flickr API 的“flickr.collections.*”部分的官方支持确实被推迟了(至少从 2007 年 4 月起)。 Flickr 上有一个讨论线程,其中包含更多信息(反向工程)在未记录的 API 上。
Official support for the "flickr.collections.*" portion of the Flickr API has indeed been delayed for some reason (since at least 4/2007). There is a discussion thread over on Flickr, with a bit more information (reverse engineering) on the undocumented API.
是的,你可以。但是,首先您需要指定所谓的“主照片”。
这意味着 flickr 不允许您创建空相册(集合)。我不知道他们为什么决定限制创建空集合,但这是事实。
Yes, you can. But, first you need to specify so-called 'primary photo'.
This means that flickr doesn't allow you to create empty albums (collections). I don't know why they decided to restrict creation of empty collections but it's a fact.