Andrew
Andrew

Reputation: 1507

Twitpic OAuth switching users issue

I'm using twitpic and logging in fine, but when changing accounts and trying to upload a pic within a short time frame (< 30 seconds) I get a "401 Unauthorized" back for a little while, and then it starts working after about a minute and my pictures upload.

This seems like maybe twitpic is caching something and it takes a little while to invalidate, or it's seeing that my IP address is the same but my oauth token is different. Anyone else have this issue, and if so how did you solve it?

Andrew

Upvotes: 0

Views: 192

Answers (2)

Thomas Castel
Thomas Castel

Reputation: 553

I had the same problem and found a fix for it:

yourRequest.shouldAttemptPersistentConnection = NO;

Hope this helps!

Upvotes: 0

Gurpartap Singh
Gurpartap Singh

Reputation: 2764

I had the exact same issue. Twitpic developers couldn't help for months!

However, I figured it to ASIHTTPRequest. If you're using ASIHTTPRequest for uploading to Twitpic servers, switch back to NSURLConnection. (or figure out why ASI would have such caching issue).

Even created https://github.com/Gurpartap/GSHTTPRequest and https://github.com/Gurpartap/GSFormDataRequest quickly modeled around ASI's counterparts for the quick replacement.

Hope it works out for you.

Upvotes: 0

Related Questions