2

It seems that over the weekend, the following Delegate method

- (void)OAuthTwitterController:(SA_OAuthTwitterController *)controller authenticatedWithUsername:(NSString *)username

began returning nil for the username parameter.

I wanted to see if anyone else using Ben Gottlieb's SDK can confirm this issue.

Thanks

ArtSabintsev
  • 5,170
  • 10
  • 41
  • 71

2 Answers2

5

I had the same issue today. The app worked fine for the past 2 months. One thing I changed was the bundle id. Maybe this has something to do with this error, because everything else is the same. Did you happen to change this too?

I changed to https the urls for twitter on SA_OAuthTwitterEngine.m and it seems to be working fine now.

Here is the code I changed:

self.requestTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/request_token"];
self.accessTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/access_token"];
self.authorizeURL = [NSURL URLWithString: @"https://twitter.com/oauth/authorize"];
carlos
  • 2,624
  • 4
  • 26
  • 36
  • Carlos, thanks for the response. Sadly, this change didn't fix my problem. Is it still working for you? – ArtSabintsev Dec 20 '11 at 01:00
  • Yes. Consistently. I have no more issues. – carlos Dec 20 '11 at 04:04
  • Is your problem the same one? nil username returned? – carlos Dec 20 '11 at 04:11
  • No, I used to have that problem, but it stopped. Right now, username is returned by posts/updates don't go through. – ArtSabintsev Dec 20 '11 at 05:26
  • There is also another issue. When authenticating, the uiwebview is called immediately with the request URL token. Sometimes this token is not available immediately, making the webview request with a nil token. This of course fails. Let me look for the relevant code. Also, if you are for example sending a tweet, and that tweet happens to be the same as another tweet, it won't be updated, you will get a call to the delegate with an error code. – carlos Dec 20 '11 at 11:39
  • Carlosm thanks for helping out. I've experienced all the issues you've mentioned, but I've been able to work around them. Until last week, my code was working fine. Then somewhere near the end of the week, it just stopped sending tweets to my personal and dev accounts. The user is definitely authenticated, because I have multiple observers than depend on having a non-nil token that does get called in my code. – ArtSabintsev Dec 20 '11 at 14:12
  • ok, now it started working! Your changes were part of the solution! Thanks! Marked your solution as correct. – ArtSabintsev Dec 20 '11 at 18:34
1

This still works fine for me. Have you tried the native Twitter API (if that's an option)?

Senior
  • 2,259
  • 1
  • 20
  • 31