iOS: error message “[TwitterKit] did encounter error with message ”Error obtaining user auth token.“:...












2















I don't success to use the Twitter API connection in iOS with Objective-C. I use that codes:



[[Twitter sharedInstance] logInWithCompletion:^
(TWTRSession *session, NSError *error) {
if (session) {
NSLog(@"");
}}];


In my AppDelegate:



- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//Twitter
[[Twitter sharedInstance] startWithConsumerKey:@"z0F**************cg" consumerSecret:@"PJu*******************N6W"];

- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
return [[Twitter sharedInstance] application:app openURL:url options:options];

return NO;
}


I precise that openURL is never called.



I obtain several error message that I don't understand:



Error Domain=TWTRNetworkingErrorDomain Code=-1011 "Request failed: unauthorized (401)" UserInfo={NSLocalizedFailureReason=Twitter API error : <?xml version="1.0" encoding="UTF-8"?>
<hash>
<error>Desktop applications only support the oauth_callback value 'oob'</error>
<request>/oauth/request_token</request>
</hash>
(code (null)), TWTRNetworkingStatusCode=401, NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, NSLocalizedDescription=Request failed: unauthorized (401)}


AND:



 [TwitterKit] did encounter error with message "Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "<?xml version="1.0" encoding="UTF-8"?>
<hash>
<error>Desktop applications only support the oauth_callback value 'oob'</error>
<request>/oauth/request_token</request>
</hash>
" UserInfo={NSLocalizedDescription=<?xml version="1.0" encoding="UTF-8"?>
<hash>
<error>Desktop applications only support the oauth_callback value 'oob'</error>
<request>/oauth/request_token</request>
</hash>
}


It seems that it is not connected, I see a lot of things in Swift, but nothing in Objective-C.



Thanks in advance.










share|improve this question





























    2















    I don't success to use the Twitter API connection in iOS with Objective-C. I use that codes:



    [[Twitter sharedInstance] logInWithCompletion:^
    (TWTRSession *session, NSError *error) {
    if (session) {
    NSLog(@"");
    }}];


    In my AppDelegate:



    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    //Twitter
    [[Twitter sharedInstance] startWithConsumerKey:@"z0F**************cg" consumerSecret:@"PJu*******************N6W"];

    - (BOOL)application:(UIApplication *)app
    openURL:(NSURL *)url
    options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
    return [[Twitter sharedInstance] application:app openURL:url options:options];

    return NO;
    }


    I precise that openURL is never called.



    I obtain several error message that I don't understand:



    Error Domain=TWTRNetworkingErrorDomain Code=-1011 "Request failed: unauthorized (401)" UserInfo={NSLocalizedFailureReason=Twitter API error : <?xml version="1.0" encoding="UTF-8"?>
    <hash>
    <error>Desktop applications only support the oauth_callback value 'oob'</error>
    <request>/oauth/request_token</request>
    </hash>
    (code (null)), TWTRNetworkingStatusCode=401, NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, NSLocalizedDescription=Request failed: unauthorized (401)}


    AND:



     [TwitterKit] did encounter error with message "Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "<?xml version="1.0" encoding="UTF-8"?>
    <hash>
    <error>Desktop applications only support the oauth_callback value 'oob'</error>
    <request>/oauth/request_token</request>
    </hash>
    " UserInfo={NSLocalizedDescription=<?xml version="1.0" encoding="UTF-8"?>
    <hash>
    <error>Desktop applications only support the oauth_callback value 'oob'</error>
    <request>/oauth/request_token</request>
    </hash>
    }


    It seems that it is not connected, I see a lot of things in Swift, but nothing in Objective-C.



    Thanks in advance.










    share|improve this question



























      2












      2








      2








      I don't success to use the Twitter API connection in iOS with Objective-C. I use that codes:



      [[Twitter sharedInstance] logInWithCompletion:^
      (TWTRSession *session, NSError *error) {
      if (session) {
      NSLog(@"");
      }}];


      In my AppDelegate:



      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
      {
      //Twitter
      [[Twitter sharedInstance] startWithConsumerKey:@"z0F**************cg" consumerSecret:@"PJu*******************N6W"];

      - (BOOL)application:(UIApplication *)app
      openURL:(NSURL *)url
      options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
      return [[Twitter sharedInstance] application:app openURL:url options:options];

      return NO;
      }


      I precise that openURL is never called.



      I obtain several error message that I don't understand:



      Error Domain=TWTRNetworkingErrorDomain Code=-1011 "Request failed: unauthorized (401)" UserInfo={NSLocalizedFailureReason=Twitter API error : <?xml version="1.0" encoding="UTF-8"?>
      <hash>
      <error>Desktop applications only support the oauth_callback value 'oob'</error>
      <request>/oauth/request_token</request>
      </hash>
      (code (null)), TWTRNetworkingStatusCode=401, NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, NSLocalizedDescription=Request failed: unauthorized (401)}


      AND:



       [TwitterKit] did encounter error with message "Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "<?xml version="1.0" encoding="UTF-8"?>
      <hash>
      <error>Desktop applications only support the oauth_callback value 'oob'</error>
      <request>/oauth/request_token</request>
      </hash>
      " UserInfo={NSLocalizedDescription=<?xml version="1.0" encoding="UTF-8"?>
      <hash>
      <error>Desktop applications only support the oauth_callback value 'oob'</error>
      <request>/oauth/request_token</request>
      </hash>
      }


      It seems that it is not connected, I see a lot of things in Swift, but nothing in Objective-C.



      Thanks in advance.










      share|improve this question
















      I don't success to use the Twitter API connection in iOS with Objective-C. I use that codes:



      [[Twitter sharedInstance] logInWithCompletion:^
      (TWTRSession *session, NSError *error) {
      if (session) {
      NSLog(@"");
      }}];


      In my AppDelegate:



      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
      {
      //Twitter
      [[Twitter sharedInstance] startWithConsumerKey:@"z0F**************cg" consumerSecret:@"PJu*******************N6W"];

      - (BOOL)application:(UIApplication *)app
      openURL:(NSURL *)url
      options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
      return [[Twitter sharedInstance] application:app openURL:url options:options];

      return NO;
      }


      I precise that openURL is never called.



      I obtain several error message that I don't understand:



      Error Domain=TWTRNetworkingErrorDomain Code=-1011 "Request failed: unauthorized (401)" UserInfo={NSLocalizedFailureReason=Twitter API error : <?xml version="1.0" encoding="UTF-8"?>
      <hash>
      <error>Desktop applications only support the oauth_callback value 'oob'</error>
      <request>/oauth/request_token</request>
      </hash>
      (code (null)), TWTRNetworkingStatusCode=401, NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, NSLocalizedDescription=Request failed: unauthorized (401)}


      AND:



       [TwitterKit] did encounter error with message "Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "<?xml version="1.0" encoding="UTF-8"?>
      <hash>
      <error>Desktop applications only support the oauth_callback value 'oob'</error>
      <request>/oauth/request_token</request>
      </hash>
      " UserInfo={NSLocalizedDescription=<?xml version="1.0" encoding="UTF-8"?>
      <hash>
      <error>Desktop applications only support the oauth_callback value 'oob'</error>
      <request>/oauth/request_token</request>
      </hash>
      }


      It seems that it is not connected, I see a lot of things in Swift, but nothing in Objective-C.



      Thanks in advance.







      ios objective-c twitter






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 30 '17 at 15:49









      rmaddy

      245k27324388




      245k27324388










      asked Oct 30 '17 at 15:49









      ΩlostAΩlostA

      8613924




      8613924
























          5 Answers
          5






          active

          oldest

          votes


















          1














          If you read the manual https://dev.twitter.com/twitterkit/ios/access-rest-api



          Check that user is logged :



          NSString *userID = [Twitter sharedInstance].sessionStore.session.userID;
          TWTRAPIClient *client = [[TWTRAPIClient alloc] initWithUserID:userID];


          Add these lines:



           TWTRLogInButton *logInButton = [TWTRLogInButton buttonWithLogInCompletion:^(TWTRSession *session, NSError *error) {
          if (session) {
          NSLog(@"signed in as %@", [session userName]);
          } else {
          NSLog(@"error: %@", [error localizedDescription]);
          }
          }];
          logInButton.center = self.view.center;
          [self.view addSubview:logInButton];


          For the image, if you check that, it will help you: Posting image to twitter using twitterkit



          [self tweetImage: [UIImage imageNamed:@"buttonRenault.png"]];





          share|improve this answer
























          • Oh very good, it works very well. For info, I took that answer in your ticket: stackoverflow.com/a/39234370/3581620

            – ΩlostA
            Oct 30 '17 at 17:12



















          7














          I get this error when i am try to integrate twitter login in my app



          Solution :



          1.
          When you create app on developer account of twitter, that time Callback Url field is not wants to empty.
          If this field is empty that time this issue comes so to overcome on this issue please don't be empty this callback url field.




          1. This error sometimes comes when twitter consumer key or twitter secret key is mismatch.
            So check Both Scenario.


          Happy Coding....!!!






          share|improve this answer































            1














                AppDelegate:
            func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

            TWTRTwitter.sharedInstance().start(withConsumerKey:"xxxx", consumerSecret:"xxxxxxxxxxx")
            return true
            }

            func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
            return TWTRTwitter.sharedInstance().application(app, open: url, options: options)
            }

            ViewController

            @IBAction func twitterClick(_ sender: Any) {
            // Swift
            let composer = TWTRComposer()

            composer.setText("just setting up my Twitter Kit")
            composer.setImage(UIImage(named: "twitterkit"))

            // Called from a UIViewController
            composer.show(from: self.navigationController!) { (result) in
            if (result == .done) {
            print("Successfully composed Tweet")
            } else {
            print("Cancelled composing")
            }
            }
            }

            @IBAction func logOutUserTwitter(_ sender: Any) {
            // Swift
            let store = TWTRTwitter.sharedInstance().sessionStore

            if let userID = store.session()?.userID {
            store.logOutUserID(userID)
            }
            }

            Info.plist
            <key>CFBundleURLTypes</key>
            <array>
            <dict>
            <key>CFBundleURLSchemes</key>
            <array>
            <string>twitterkit-<xxxx></string>
            </array>
            </dict>
            </array>
            <key>LSApplicationQueriesSchemes</key>
            <array>
            <string>twitter</string>
            <string>twitterauth</string>
            </array>

            Settings Twitter page develop:
            Callback URL enter http://localhost


            https://github.com/twitter/twitter-kit-ios/wiki/Installation






            share|improve this answer

































              1














              From June 12th 2018 callback locking will no longer be optional. The correct callback format for iOS apps is:



              twitterkit-MY_CONSUMER_KEY://


              https://developer.twitter.com/en/docs/basics/developer-portal/guides/callback-urls






              share|improve this answer































                0














                disable in twitter this: Enable Callback Locking (It is recommended to enable callback locking to ensure apps cannot overwrite the callback url)
                and paste something to the callback url






                share|improve this answer























                  Your Answer






                  StackExchange.ifUsing("editor", function () {
                  StackExchange.using("externalEditor", function () {
                  StackExchange.using("snippets", function () {
                  StackExchange.snippets.init();
                  });
                  });
                  }, "code-snippets");

                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "1"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47019298%2fios-error-message-twitterkit-did-encounter-error-with-message-error-obtaini%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  5 Answers
                  5






                  active

                  oldest

                  votes








                  5 Answers
                  5






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  1














                  If you read the manual https://dev.twitter.com/twitterkit/ios/access-rest-api



                  Check that user is logged :



                  NSString *userID = [Twitter sharedInstance].sessionStore.session.userID;
                  TWTRAPIClient *client = [[TWTRAPIClient alloc] initWithUserID:userID];


                  Add these lines:



                   TWTRLogInButton *logInButton = [TWTRLogInButton buttonWithLogInCompletion:^(TWTRSession *session, NSError *error) {
                  if (session) {
                  NSLog(@"signed in as %@", [session userName]);
                  } else {
                  NSLog(@"error: %@", [error localizedDescription]);
                  }
                  }];
                  logInButton.center = self.view.center;
                  [self.view addSubview:logInButton];


                  For the image, if you check that, it will help you: Posting image to twitter using twitterkit



                  [self tweetImage: [UIImage imageNamed:@"buttonRenault.png"]];





                  share|improve this answer
























                  • Oh very good, it works very well. For info, I took that answer in your ticket: stackoverflow.com/a/39234370/3581620

                    – ΩlostA
                    Oct 30 '17 at 17:12
















                  1














                  If you read the manual https://dev.twitter.com/twitterkit/ios/access-rest-api



                  Check that user is logged :



                  NSString *userID = [Twitter sharedInstance].sessionStore.session.userID;
                  TWTRAPIClient *client = [[TWTRAPIClient alloc] initWithUserID:userID];


                  Add these lines:



                   TWTRLogInButton *logInButton = [TWTRLogInButton buttonWithLogInCompletion:^(TWTRSession *session, NSError *error) {
                  if (session) {
                  NSLog(@"signed in as %@", [session userName]);
                  } else {
                  NSLog(@"error: %@", [error localizedDescription]);
                  }
                  }];
                  logInButton.center = self.view.center;
                  [self.view addSubview:logInButton];


                  For the image, if you check that, it will help you: Posting image to twitter using twitterkit



                  [self tweetImage: [UIImage imageNamed:@"buttonRenault.png"]];





                  share|improve this answer
























                  • Oh very good, it works very well. For info, I took that answer in your ticket: stackoverflow.com/a/39234370/3581620

                    – ΩlostA
                    Oct 30 '17 at 17:12














                  1












                  1








                  1







                  If you read the manual https://dev.twitter.com/twitterkit/ios/access-rest-api



                  Check that user is logged :



                  NSString *userID = [Twitter sharedInstance].sessionStore.session.userID;
                  TWTRAPIClient *client = [[TWTRAPIClient alloc] initWithUserID:userID];


                  Add these lines:



                   TWTRLogInButton *logInButton = [TWTRLogInButton buttonWithLogInCompletion:^(TWTRSession *session, NSError *error) {
                  if (session) {
                  NSLog(@"signed in as %@", [session userName]);
                  } else {
                  NSLog(@"error: %@", [error localizedDescription]);
                  }
                  }];
                  logInButton.center = self.view.center;
                  [self.view addSubview:logInButton];


                  For the image, if you check that, it will help you: Posting image to twitter using twitterkit



                  [self tweetImage: [UIImage imageNamed:@"buttonRenault.png"]];





                  share|improve this answer













                  If you read the manual https://dev.twitter.com/twitterkit/ios/access-rest-api



                  Check that user is logged :



                  NSString *userID = [Twitter sharedInstance].sessionStore.session.userID;
                  TWTRAPIClient *client = [[TWTRAPIClient alloc] initWithUserID:userID];


                  Add these lines:



                   TWTRLogInButton *logInButton = [TWTRLogInButton buttonWithLogInCompletion:^(TWTRSession *session, NSError *error) {
                  if (session) {
                  NSLog(@"signed in as %@", [session userName]);
                  } else {
                  NSLog(@"error: %@", [error localizedDescription]);
                  }
                  }];
                  logInButton.center = self.view.center;
                  [self.view addSubview:logInButton];


                  For the image, if you check that, it will help you: Posting image to twitter using twitterkit



                  [self tweetImage: [UIImage imageNamed:@"buttonRenault.png"]];






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 30 '17 at 17:07









                  dt dinodt dino

                  711314




                  711314













                  • Oh very good, it works very well. For info, I took that answer in your ticket: stackoverflow.com/a/39234370/3581620

                    – ΩlostA
                    Oct 30 '17 at 17:12



















                  • Oh very good, it works very well. For info, I took that answer in your ticket: stackoverflow.com/a/39234370/3581620

                    – ΩlostA
                    Oct 30 '17 at 17:12

















                  Oh very good, it works very well. For info, I took that answer in your ticket: stackoverflow.com/a/39234370/3581620

                  – ΩlostA
                  Oct 30 '17 at 17:12





                  Oh very good, it works very well. For info, I took that answer in your ticket: stackoverflow.com/a/39234370/3581620

                  – ΩlostA
                  Oct 30 '17 at 17:12













                  7














                  I get this error when i am try to integrate twitter login in my app



                  Solution :



                  1.
                  When you create app on developer account of twitter, that time Callback Url field is not wants to empty.
                  If this field is empty that time this issue comes so to overcome on this issue please don't be empty this callback url field.




                  1. This error sometimes comes when twitter consumer key or twitter secret key is mismatch.
                    So check Both Scenario.


                  Happy Coding....!!!






                  share|improve this answer




























                    7














                    I get this error when i am try to integrate twitter login in my app



                    Solution :



                    1.
                    When you create app on developer account of twitter, that time Callback Url field is not wants to empty.
                    If this field is empty that time this issue comes so to overcome on this issue please don't be empty this callback url field.




                    1. This error sometimes comes when twitter consumer key or twitter secret key is mismatch.
                      So check Both Scenario.


                    Happy Coding....!!!






                    share|improve this answer


























                      7












                      7








                      7







                      I get this error when i am try to integrate twitter login in my app



                      Solution :



                      1.
                      When you create app on developer account of twitter, that time Callback Url field is not wants to empty.
                      If this field is empty that time this issue comes so to overcome on this issue please don't be empty this callback url field.




                      1. This error sometimes comes when twitter consumer key or twitter secret key is mismatch.
                        So check Both Scenario.


                      Happy Coding....!!!






                      share|improve this answer













                      I get this error when i am try to integrate twitter login in my app



                      Solution :



                      1.
                      When you create app on developer account of twitter, that time Callback Url field is not wants to empty.
                      If this field is empty that time this issue comes so to overcome on this issue please don't be empty this callback url field.




                      1. This error sometimes comes when twitter consumer key or twitter secret key is mismatch.
                        So check Both Scenario.


                      Happy Coding....!!!







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Feb 28 '18 at 9:49









                      Rahul FateRahul Fate

                      239314




                      239314























                          1














                              AppDelegate:
                          func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

                          TWTRTwitter.sharedInstance().start(withConsumerKey:"xxxx", consumerSecret:"xxxxxxxxxxx")
                          return true
                          }

                          func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
                          return TWTRTwitter.sharedInstance().application(app, open: url, options: options)
                          }

                          ViewController

                          @IBAction func twitterClick(_ sender: Any) {
                          // Swift
                          let composer = TWTRComposer()

                          composer.setText("just setting up my Twitter Kit")
                          composer.setImage(UIImage(named: "twitterkit"))

                          // Called from a UIViewController
                          composer.show(from: self.navigationController!) { (result) in
                          if (result == .done) {
                          print("Successfully composed Tweet")
                          } else {
                          print("Cancelled composing")
                          }
                          }
                          }

                          @IBAction func logOutUserTwitter(_ sender: Any) {
                          // Swift
                          let store = TWTRTwitter.sharedInstance().sessionStore

                          if let userID = store.session()?.userID {
                          store.logOutUserID(userID)
                          }
                          }

                          Info.plist
                          <key>CFBundleURLTypes</key>
                          <array>
                          <dict>
                          <key>CFBundleURLSchemes</key>
                          <array>
                          <string>twitterkit-<xxxx></string>
                          </array>
                          </dict>
                          </array>
                          <key>LSApplicationQueriesSchemes</key>
                          <array>
                          <string>twitter</string>
                          <string>twitterauth</string>
                          </array>

                          Settings Twitter page develop:
                          Callback URL enter http://localhost


                          https://github.com/twitter/twitter-kit-ios/wiki/Installation






                          share|improve this answer






























                            1














                                AppDelegate:
                            func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

                            TWTRTwitter.sharedInstance().start(withConsumerKey:"xxxx", consumerSecret:"xxxxxxxxxxx")
                            return true
                            }

                            func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
                            return TWTRTwitter.sharedInstance().application(app, open: url, options: options)
                            }

                            ViewController

                            @IBAction func twitterClick(_ sender: Any) {
                            // Swift
                            let composer = TWTRComposer()

                            composer.setText("just setting up my Twitter Kit")
                            composer.setImage(UIImage(named: "twitterkit"))

                            // Called from a UIViewController
                            composer.show(from: self.navigationController!) { (result) in
                            if (result == .done) {
                            print("Successfully composed Tweet")
                            } else {
                            print("Cancelled composing")
                            }
                            }
                            }

                            @IBAction func logOutUserTwitter(_ sender: Any) {
                            // Swift
                            let store = TWTRTwitter.sharedInstance().sessionStore

                            if let userID = store.session()?.userID {
                            store.logOutUserID(userID)
                            }
                            }

                            Info.plist
                            <key>CFBundleURLTypes</key>
                            <array>
                            <dict>
                            <key>CFBundleURLSchemes</key>
                            <array>
                            <string>twitterkit-<xxxx></string>
                            </array>
                            </dict>
                            </array>
                            <key>LSApplicationQueriesSchemes</key>
                            <array>
                            <string>twitter</string>
                            <string>twitterauth</string>
                            </array>

                            Settings Twitter page develop:
                            Callback URL enter http://localhost


                            https://github.com/twitter/twitter-kit-ios/wiki/Installation






                            share|improve this answer




























                              1












                              1








                              1







                                  AppDelegate:
                              func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

                              TWTRTwitter.sharedInstance().start(withConsumerKey:"xxxx", consumerSecret:"xxxxxxxxxxx")
                              return true
                              }

                              func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
                              return TWTRTwitter.sharedInstance().application(app, open: url, options: options)
                              }

                              ViewController

                              @IBAction func twitterClick(_ sender: Any) {
                              // Swift
                              let composer = TWTRComposer()

                              composer.setText("just setting up my Twitter Kit")
                              composer.setImage(UIImage(named: "twitterkit"))

                              // Called from a UIViewController
                              composer.show(from: self.navigationController!) { (result) in
                              if (result == .done) {
                              print("Successfully composed Tweet")
                              } else {
                              print("Cancelled composing")
                              }
                              }
                              }

                              @IBAction func logOutUserTwitter(_ sender: Any) {
                              // Swift
                              let store = TWTRTwitter.sharedInstance().sessionStore

                              if let userID = store.session()?.userID {
                              store.logOutUserID(userID)
                              }
                              }

                              Info.plist
                              <key>CFBundleURLTypes</key>
                              <array>
                              <dict>
                              <key>CFBundleURLSchemes</key>
                              <array>
                              <string>twitterkit-<xxxx></string>
                              </array>
                              </dict>
                              </array>
                              <key>LSApplicationQueriesSchemes</key>
                              <array>
                              <string>twitter</string>
                              <string>twitterauth</string>
                              </array>

                              Settings Twitter page develop:
                              Callback URL enter http://localhost


                              https://github.com/twitter/twitter-kit-ios/wiki/Installation






                              share|improve this answer















                                  AppDelegate:
                              func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

                              TWTRTwitter.sharedInstance().start(withConsumerKey:"xxxx", consumerSecret:"xxxxxxxxxxx")
                              return true
                              }

                              func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
                              return TWTRTwitter.sharedInstance().application(app, open: url, options: options)
                              }

                              ViewController

                              @IBAction func twitterClick(_ sender: Any) {
                              // Swift
                              let composer = TWTRComposer()

                              composer.setText("just setting up my Twitter Kit")
                              composer.setImage(UIImage(named: "twitterkit"))

                              // Called from a UIViewController
                              composer.show(from: self.navigationController!) { (result) in
                              if (result == .done) {
                              print("Successfully composed Tweet")
                              } else {
                              print("Cancelled composing")
                              }
                              }
                              }

                              @IBAction func logOutUserTwitter(_ sender: Any) {
                              // Swift
                              let store = TWTRTwitter.sharedInstance().sessionStore

                              if let userID = store.session()?.userID {
                              store.logOutUserID(userID)
                              }
                              }

                              Info.plist
                              <key>CFBundleURLTypes</key>
                              <array>
                              <dict>
                              <key>CFBundleURLSchemes</key>
                              <array>
                              <string>twitterkit-<xxxx></string>
                              </array>
                              </dict>
                              </array>
                              <key>LSApplicationQueriesSchemes</key>
                              <array>
                              <string>twitter</string>
                              <string>twitterauth</string>
                              </array>

                              Settings Twitter page develop:
                              Callback URL enter http://localhost


                              https://github.com/twitter/twitter-kit-ios/wiki/Installation







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Mar 8 '18 at 3:41

























                              answered Mar 8 '18 at 3:35









                              GiangGiang

                              1,4441216




                              1,4441216























                                  1














                                  From June 12th 2018 callback locking will no longer be optional. The correct callback format for iOS apps is:



                                  twitterkit-MY_CONSUMER_KEY://


                                  https://developer.twitter.com/en/docs/basics/developer-portal/guides/callback-urls






                                  share|improve this answer




























                                    1














                                    From June 12th 2018 callback locking will no longer be optional. The correct callback format for iOS apps is:



                                    twitterkit-MY_CONSUMER_KEY://


                                    https://developer.twitter.com/en/docs/basics/developer-portal/guides/callback-urls






                                    share|improve this answer


























                                      1












                                      1








                                      1







                                      From June 12th 2018 callback locking will no longer be optional. The correct callback format for iOS apps is:



                                      twitterkit-MY_CONSUMER_KEY://


                                      https://developer.twitter.com/en/docs/basics/developer-portal/guides/callback-urls






                                      share|improve this answer













                                      From June 12th 2018 callback locking will no longer be optional. The correct callback format for iOS apps is:



                                      twitterkit-MY_CONSUMER_KEY://


                                      https://developer.twitter.com/en/docs/basics/developer-portal/guides/callback-urls







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Nov 21 '18 at 9:22









                                      shahilshahil

                                      599517




                                      599517























                                          0














                                          disable in twitter this: Enable Callback Locking (It is recommended to enable callback locking to ensure apps cannot overwrite the callback url)
                                          and paste something to the callback url






                                          share|improve this answer




























                                            0














                                            disable in twitter this: Enable Callback Locking (It is recommended to enable callback locking to ensure apps cannot overwrite the callback url)
                                            and paste something to the callback url






                                            share|improve this answer


























                                              0












                                              0








                                              0







                                              disable in twitter this: Enable Callback Locking (It is recommended to enable callback locking to ensure apps cannot overwrite the callback url)
                                              and paste something to the callback url






                                              share|improve this answer













                                              disable in twitter this: Enable Callback Locking (It is recommended to enable callback locking to ensure apps cannot overwrite the callback url)
                                              and paste something to the callback url







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered May 5 '18 at 12:56









                                              user14511user14511

                                              839




                                              839






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Stack Overflow!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47019298%2fios-error-message-twitterkit-did-encounter-error-with-message-error-obtaini%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  鏡平學校

                                                  ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

                                                  Why https connections are so slow when debugging (stepping over) in Java?