2

Has anyone encountered the following error message when sending to Twitter?

"Error: Incorrect signature"

And on the debug console:

<0xf14cf80 SHKTwitter.m:(356)> Twitter Send Status Error: {"request":"\/1\/statuses\/update.json","error":"Incorrect signature"}

So far as I can tell I've followed the install instructions on http://www.getsharekit.com/install/#download and it is working with Facebook, e-mail etc. just not Twitter.

It would be great if someone has seen this error before and goes "aha!".

andygeers
  • 6,909
  • 9
  • 49
  • 63
Ken
  • 30,811
  • 34
  • 116
  • 155
  • Can you copy and paste the bit of the code where you do the API request to twitter? – Enrico Susatyo Nov 29 '10 at 10:50
  • possible duplicate of [Twitter API status update always returns "Incorrect signature"](http://stackoverflow.com/questions/3868036/twitter-api-status-update-always-returns-incorrect-signature) – Abizern Nov 30 '10 at 13:19

3 Answers3

1

All I did to enable twitter Sharing is:

  1. Regitered my App as a Twitter APP (Application Type: Browser)
  2. #define SHKTwitterConsumerKey @"My..." #define SHKTwitterSecret @"My..." #define SHKTwitterCallbackUrl @"http://www.anything.com/callback" // You need to set this if using OAuth, see note above (xAuth users can skip it) \#define SHKTwitterUseXAuth 0 // To use xAuth, set to 1 \#define SHKTwitterUsername @"" // Enter your app's twitter account if you'dlike to ask the user to follow it when logging in. (Only for xAuth)

    • Note that for the callback function you can enter any URL you want. even www.google.com. Just make sure it is the same URL in your code.
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
AYBABTU
  • 986
  • 3
  • 17
  • 39
  • 1
    Exactly. This is what I did too (I think!) because I also followed Weiner's instructions. Facebook is working for me. Twitter is not yet. I get an "Error: Incorrect signature" message when I send the Tweet. – Ken Nov 30 '10 at 13:54
1

The issue is that you're signed into your twitter account, and allowed the app to connect to your profile.

However, days go by, the Key and Secret change, and now you're seeing this error. It's because you have to log out and re-log back into Twitter. I spent waaay too much time finding this out when I created a new Twitter App to hook into (and organize my apps) and found this error.

Basically, ShareKit is saving your login info, auto-logging you in, and getting the error when twitter says the app doesn't have permission to connect to your profile.

Follow these steps to log yourself out and test again :

http://www.getsharekit.com/docs/#logout

Dominic Tancredi
  • 41,134
  • 7
  • 34
  • 50
0

Check this previous SO question, it might be able to help you solve the problem: Twitter API status update always returns "Incorrect signature"

Community
  • 1
  • 1
Rog
  • 18,602
  • 6
  • 76
  • 97
  • I think it might be somewhat differnet. He's using sharekit for iPhone SDK and the link that you give seems to be a java program... Maybe this is something else happening here. – Enrico Susatyo Nov 29 '10 at 10:49
  • That's right Monkey. It does seem to be a problem. I still don't know what's up. I haven't customised ShareKit at all, I've followed all of the instructions. It works very well for Facebook. I'll keep trying too.... – Ken Nov 29 '10 at 11:59
  • I switched to using my backup laptop for unrelated reasons and for reasons I don't understand my code now all works fine. Hey-ho! – Ken Dec 02 '10 at 02:39