Processing
 

Login to Twitter sometime fail

04/08/2016 09:06#1

Joined at: 4 months ago

Post: 3

Thank: 0

Thanked: 0

I use the simple code for login to Twitter

[[Twitter sharedInstance] logInWithCompletion:^(TWTRSession *session, NSError *error) {         if (session != nil) {             NSLog(@"successful %@",session);         } else {             NSLog(@"error: %@", error);         }     }]; 

and sometime I got the error like

2016-08-04 15:39:14.472 MyProject[11143:132894] [TwitterKit] did encounter error with message "Error attempting to obtain temporary auth token.": Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x7fe043a49830 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://api.twitter.com/oauth/request_token, NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.} 2016-08-04 15:39:14.473 EarCrush[11143:132894] [TwitterKit] did encounter error with message "Unable to authenticate using the system account.": Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x7fe043a49830 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://api.twitter.com/oauth/request_token, NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.}

2016-08-04 15:39:14.473 MyProject[11143:132894] error: Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x7fe043a49830 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://api.twitter.com/oauth/request_token, NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.}

I mean sometime because:

  • 2 days ago I can login to Twitter normally
  • Yesterday I can not login,
  • This morning I can login but now (afternoon) I can not login even I don't change any code

I have update my Twitter via Fabric to latest version now (2.3) and I'm sure I have internet connection

I know my problem is very strangely but hope someone have a same problem like me can give me some suggestion for fix it

19/09/2016 11:54Top#2

DanielQ

Member

Joined at: 7 months ago

Post: 3

Thank: 0

Thanked: 0

I had problem with login with Twitter and Firebase. This code working for me:

Twitter.sharedInstance().startWithConsumerKey("key", consumerSecret: "secret") 

in AppDelegate. Then, when you tap on your custom login button call this:

Twitter.sharedInstance().logInWithCompletion() { session, error in         if let session = session { ... }) 

If you using Fabric, you don't need to call Fabric.with([Twitter.self]).

Similar articles

How do twitter giveaways work?

8 months ago - Reply: 2 - Views: 126

How may I get genuine followers on Twitter?

3 years ago - Reply: 33 - Views: 1,828

Login to Twitter sometime fail

6 months ago - Reply: 1 - Views: 23

Twitter doesn't accept PHP's cURL, but Linux'

1 year ago - Reply: 2 - Views: 90

Twitter OAuth on iOS

5 months ago - Reply: 1 - Views: 92

why am i getting an error on .verifyCredentials()

5 months ago - Reply: 1 - Views: 35

TwitteR setup_twitter_oauth() gives an error

5 months ago - Reply: 1 - Views: 29

Tweepy - Getting the author of a retweeted tweet

5 months ago - Reply: 0 - Views: 4

Retrieving data from twitter with JavaScript

5 months ago - Reply: 0 - Views: 2

Combined social media feed returning the wrong data

5 months ago - Reply: 0 - Views: 0

Django and Twitter request_token

5 months ago - Reply: 0 - Views: 0

Python HMAC hashed value encoding to base64

5 months ago - Reply: 1 - Views: 32

At the rate symbol in facebook

5 months ago - Reply: 0 - Views: 1

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re