Twitpic says that my OAuth data was rejected by twitter

371 views Asked by At


I have a problem with uploading images to twitter. I'm using MGTwitterEngine + OAuth for accessing Twitter - it works perfectly. I can access timelines, lists etc. BUt now I need to upload an image. I'm using GSTwitterEngine for it.
Twitpic API 2 returns:
Error 401 "Could not authenticate you (header rejected by twitter)"
Twitter still works. I've compared content of "Authorization" field in twitter's request field with "X-Verify-Credentials-Authorization" field in twitpic's field - they are identical except timestamp, oauth_signature and nonce fields that aren't have to be same.
Post body contains all required fields. If there is no any of required fields I have an error message from twitpic.
Twitpic API1 returns something like valid responce but with 'null' instead of images's width, height, type, 1st Jan 1970 in timestamp and id = 0 in picture id. But it returns valid user info (id and displaying user name!). All required fields are there, in other case I have appropriate error message.
I was using base64 and binnary formats for png and jpeg images. It changes nothing.

Did anybody have same problem?

1

There are 1 answers

0
Ravi Tyagi On

Solution: you need to change your Registered Application's (Application that you have created on Twitter) "Application Type settings" to Read and Write Steps:

  1. open and login to https://dev.twitter.com
  2. Click on "My Applications"
  3. Click on "Settings"
  4. Change "Application Type" to "Read and Write"

and you are done!! now run your app and upload photo it will work