Flickr的API:API密钥弟妹无效? [英] Flickr API: API key keeps getting invalid?

查看:500
本文介绍了Flickr的API:API密钥弟妹无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我使用从手机上传的照片其中Flickr和所有图像都是公开的。在我的博客我想检索所有显示图像和我已经第一次试图创建一个应用程序,让我的API密钥。我使用Flickr的API的 flickr.people.getPublicPhotos 。这个API服务表示不要求身份验证和把他们放在一起我结束了这一呼吁:

<$p$p><$c$c>http://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=fc94274cd0335f3c171fe22c8490b7d9&user_id=5545356%40N04&extras=description%2Cdate_upload%2Cdate_taken%2Cowner_name%2Coriginal_format%2Ctags%2C+o_dims%2C+views%2C+media%2C+path_alias%2C+url_sq%2C+url_t%2C+url_s%2C+url_q%2C+url_m%2C+url_n%2C+url_z%2C+url_c%2C+url_l%2C+url_o&per_page=40&format=php_serial&api_sig=0c48e2b6b6d9a03521e5ca86a15cf471

问题是,每10个小时左右我将失败并返回错误信息 A:3:{S:4:STAT; S:4:不及格; S:4: code; I:100; S:7:消息; S:31:无效的API密钥(密钥未找到);}

我试着在上Flickr,不登录,并在这两种情况下我得到错误信息记录,并在创建API调用。这就像API密钥过期或停止工作。有关于API密钥还是什么Flickr上错过了什么原因?这是很无奈以每天两次更新URL。

感谢您

真诚的结果
- Mestika


解决方案

如果我正确地阅读文档时,&安培; api_sig查询字符串参数使用身份验证令牌,一个最终到期构成。删除参数(=不签你的API请求),我想你会好起来的。

I’ve a Flickr which I’m using to upload pictures from my phone and all images are public. On my blog I want to retrieve all the images to show and for that I’ve first tried to create an application to get my API key. I’m using the Flickr API flickr.people.getPublicPhotos. This API service is said to not require authentication and putting it all together I end up with this call:

http://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=fc94274cd0335f3c171fe22c8490b7d9&user_id=5545356%40N04&extras=description%2Cdate_upload%2Cdate_taken%2Cowner_name%2Coriginal_format%2Ctags%2C+o_dims%2C+views%2C+media%2C+path_alias%2C+url_sq%2C+url_t%2C+url_s%2C+url_q%2C+url_m%2C+url_n%2C+url_z%2C+url_c%2C+url_l%2C+url_o&per_page=40&format=php_serial&api_sig=0c48e2b6b6d9a03521e5ca86a15cf471

The problem is that every around 10 hours I fails and returns the error message a:3:{s:4:"stat";s:4:"fail";s:4:"code";i:100;s:7:"message";s:31:"Invalid API Key (Key not found)";}

I tried to create the API call when logged in to Flickr and also with not logging in and in both cases I get the error message. It’s like the API key expires or stops working. Have a missed something on Flickr about the API key or what could cause this? It is really frustrating to renew the URL twice at day.

Thank you

Sincere
- Mestika

解决方案

If I read the docs correctly, the &api_sig query string parameter is constructed using an authentication token, one that eventually expires. Remove that parameter (= do not sign your API request) and I think you'll be OK.

这篇关于Flickr的API:API密钥弟妹无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆