Comments (7)
Well there are plenty of people using it, and I use it in my apps on the store.
However, I try and take a look early next week just to be sure.
Thanks
David
On 29 Mar 2014, at 18:58, James Bucanek [email protected] wrote:
I’m brand new to using the Flickr API, so I thought the FlickrKit would save me a lot of work. In general, it has, but I’m stuck on a problem and I don’t know what the cause (Flickr or FlickrKit) is.
When I try to authorize for the first time, I get to the authorization link, enter the user ID and password, and submit. The web view goes to a page that asks the user if they want to authorize my app to use their account (I’m requesting “write” privileges). After clicking the “OK, I’ll Authorize It” button, my app gets the callback URL, but it’s always a failure: oauth_problem=signature_invalid.
I tried setting up my app’s ID and secret in the FlickrKitDemo project and trying it there, and I get the exact same results.
So is there something I’m missing or is FlickrKit broken?
—
Reply to this email directly or view it on GitHub.
from flickrkit.
Thanks, David.
I stepped through the code and found the step that fails. When I get redirected to my callback URL, it contains two parameters:
?oauth_token=72157643127809553-74aca1476baea6b6&oauth_verifier=bd7f462708d2c8c2
I then followed it through -completeAuthWithURL:completion:, where is construted the following URL:
http://www.flickr.com/services/oauth/access_token?oauth_verifier=bd7f462708d2c8c2&oauth_timestamp=1396129616.386816&oauth_version=1.0&oauth_consumer_key=f79b94fe97c0d4c01efd1305c886304e&oauth_token=72157643127809553-74aca1476baea6b6&oauth_signature=ihPKk13ivPCTkRyB3Q%2BaTwt9NeE%3D&oauth_nonce=7DB8298C&oauth_signature_method=HMAC-SHA1
This request returns the oauth_problem=signature_invalid. But as far I tell, the signature is being hashed from my app's secret key (which I've tripled checked) and the requested URL, which appears to be exactly what's required.
So as far as I can tell, FlickrKit is doing exactly what it should do. Which means that there’s something wrong with Flickr (which seems equally unlikely) or I’m somehow doing something wrong in my code, although it follows the same general pattern used in FlickrKitDemo (and my build of FlickrKitDemo gets the same error).
At this point, I’m left wondering if I’m using the wrong app secret value—although I copied and pasted it directly from my “App by You” page—OR maybe this is not the value I’m supposed to supply in -initializeWithAPIKey:sharedSecret:???
from flickrkit.
It's not unlikely the flick API has an issue. Sometimes it does.
You can ask on the yahoo flick dev user group.
David Casserly
www.davidjc.com
On 29 Mar 2014, at 22:37, James Bucanek [email protected] wrote:
Thanks, David.
I stepped through the code and found the step that fails. When I get redirected to my callback URL, it contains two parameters:
?oauth_token=72157643127809553-74aca1476baea6b6&oauth_verifier=bd7f462708d2c8c2
I then followed it through -completeAuthWithURL:completion:, where is construted the following URL:http://www.flickr.com/services/oauth/access_token?oauth_verifier=bd7f462708d2c8c2&oauth_timestamp=1396129616.386816&oauth_version=1.0&oauth_consumer_key=f79b94fe97c0d4c01efd1305c886304e&oauth_token=72157643127809553-74aca1476baea6b6&oauth_signature=ihPKk13ivPCTkRyB3Q%2BaTwt9NeE%3D&oauth_nonce=7DB8298C&oauth_signature_method=HMAC-SHA1
This request returns the oauth_problem=signature_invalid. But as far I tell, the signature is being hashed from my app's secret key (which I've tripled checked) and the requested URL, which appears to be exactly what's required.So as far as I can tell, FlickrKit is doing exactly what it should do. Which means that there’s something wrong with Flickr (which seems equally unlikely) or I’m somehow doing something wrong in my code, although it follows the same general pattern used in FlickrKitDemo (and my build of FlickrKitDemo gets the same error).
At this point, I’m left wondering if I’m using the wrong app secret value—although I copied and pasted it directly from my “App by You” page—OR maybe this is not the value I’m supposed to supply in -initializeWithAPIKey:sharedSecret:???
—
Reply to this email directly or view it on GitHub.
from flickrkit.
I'm running into the same issue as James. To exclude any problems with my own code, I just copy/pasted my Flickr API key and secret in the FlickrKitDemo app.
from flickrkit.
I also posted this issue to the Flickr dev list. So far the only suggestion is that I’m not signing the authorization request with both my app’s secret and the oauth_token_secret returned by the token request. This morning I carefully stepped through the code in the framework and confirmed that this isn’t the case:
- The initial request token URL is sent, signed using just the app secret.
- That request replies with a oath_token_secret value, which is saved by FlickrKit.
- The next signed request creates a new signature string that's a combination of my app's secret and the oauth_token_secret, in the form "<app_secret>&<oauth_token_secret>".
- That signed request returns a signature_invalid error.
I'm beginning to wonder if the problem is either a recent change in Flickr’s API that broke FlickrKit, or a recent change to Flickr’s API that broke the authorization of new apps?
from flickrkit.
cmejia9 just left a message on the Flickr dev list. They said that Flickr has been having a problem with authorizing some accounts since last Tuesday. It’s not all accounts. They said in testing 6 different accounts, 5 of them worked OK and one failed.
They also said that using the https: (instead of the http:) to request the access token will skirt around the problem. I hacked the -beginAuthWithCallbackURL:permission:completion method to send an “https:” request instead, and everything works now.
The post led me to believe that Flickr is preparing to switch over to https as the preferred scheme, and changes related to that upgrade have broken the existing http method. I’ve asked what the status is, and can I use https now, or should I wait until the http bug is fixed. If you want to follow the discussion, you’ll find it here: https://groups.yahoo.com/neo/groups/yws-flickr/conversations/topics/8666
from flickrkit.
I can confirm that changing some http:// schemes to https:// in the FlickrKit code fixes the issue.
from flickrkit.
Related Issues (20)
- OS X support HOT 1
- Default Account HOT 2
- License warning HOT 2
- Link error: duplicate symbol _OBJC_IVAR_$_AppDelegate._window HOT 4
- How to replicate in Swift HOT 3
- Uploading fails with "POST size too large"
- iOS9 deprecation warnings HOT 1
- Response is very slow HOT 1
- Bug when size is unknown
- not working
- Using swift 2.0 on ios 9.2 facing Error as bellow HOT 4
- I am using swift 2.1. Which method should i use to post image to Flickr HOT 1
- I am using swift 2.1. trying to post image to Flickr HOT 4
- Post image Never work with swift 2.1 HOT 2
- Flickr Auth issue
- 1.0.9 not available in cocoapods HOT 3
- "This Photo Is No Longer Available" Returned everytime HOT 1
- No such module 'FlickerKit' HOT 1
- Flickr doesn't recognise the "oauth_token" this application is trying to use HOT 1
- Argument list too long: recursive header expansion failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flickrkit.