twitterkit

TWTRComposerViewController not appearing in iPhone X landscape

浪尽此生 提交于 2019-12-13 03:25:10
问题 We are implementing TWTRComposerViewController in our landscape App for posting tweets from the App using videos created within the App. We're using the below written code: if (Twitter.sharedInstance().sessionStore.hasLoggedInUsers()) { let txtString = "App-Name" let composer = TWTRComposerViewController(initialText:txtString, image:nil, videoURL:nil) composer.delegate = self viewController.present(composer, animated: false, completion: { completion(true) }) } else { Twitter.sharedInstance()

Login with twitter always return error

℡╲_俬逩灬. 提交于 2019-12-11 15:25:36
问题 I am try to add login with twitter but some how I am not able to get response. Everytime I got the error message ( error obtaining user auth token ). I know there are lot's SO post which has this issue but I am not able to login. I also try advance setting but I got session nil. I also regenerate the consumer key and Secret but no luck. using swift 3.0 Here is my code TWTRTwitter.sharedInstance().logIn(with: self) { (session, error) in if (session != nil) { print("signed in as \(session?

Twitterkit 3.0 'TWTRInvalidInitializationException' error in ios

安稳与你 提交于 2019-12-11 08:17:18
问题 I had used fabric with no issue but since new twitterkit 3.0 update I followed all the installation document but when I use TWTRComposer I get app crash with folowing message: "'TWTRInvalidInitializationException', reason: 'Attempt made to Log in or Like a Tweet without a valid Twitter Kit URL Scheme set up in the app settings." Can't seem to figure out solution. // Swift let composer = TWTRComposer() composer.setText("just setting up my Twitter Kit") composer.setImage(image.image) // Called

Tweeting using Twitterkit fails when Twitter app is not installed in iOS 11

匆匆过客 提交于 2019-12-11 07:38:28
问题 I am following the documentation of twitter and below is the example code they have given to check logged in user session and tweet using the TWTRComposer. // Check if current session has users logged in if ([[Twitter sharedInstance].sessionStore hasLoggedInUsers]) { TWTRComposerViewController *composer = [TWTRComposerViewController emptyComposer]; [fromController presentViewController:composer animated:YES completion:nil]; } else { [[Twitter sharedInstance] logInWithCompletion:^(TWTRSession

Error code 403 when using guest authentication with TwitterKit iOS for getting user timeline

徘徊边缘 提交于 2019-12-11 02:25:26
问题 I am using Fabric's twitter kit for getting a username's tweets in my iOS application by making a request to the REST API endpoint "https://api.twitter.com/1.1/statuses/user_timeline.json" I am have correctly set up my "consumer key" and "consumer secret key" as provided by the Fabric app in my AppDelegate and info.plist , but I repeatedly get the following error message - Error: Optional(Error Domain=TwitterAPIErrorDomain Code=200 "Request failed: forbidden (403)" UserInfo=

TWTRTwitter sessionStore now returns TWTRAuthSession: so how does one access the userName property now?

北战南征 提交于 2019-12-11 01:22:33
问题 With TwitterKit 3.3.0 in Swift sharedInstance().sessionStore.session() now returns a TWTRAuthSession rather than a TWTRSession , as before. Things change, that's fine, however the documentation hasn't been updated to reflect this, and as such I no longer know how to access the userName property that the former TWTRSession object offered. 回答1: You can do this with perform(_:) Hope below will help those who face this. let username = session.perform(#selector(getter: TWTRSession.userName))?

Login with Twitter on iOS

点点圈 提交于 2019-12-10 00:03:36
问题 I have a problem with twitter login on iOS. If the user has account set in Settings application, I get the following error: [TwitterKit] did encounter error with message "User's system account credentials are invalid.": Error Domain=TWTRLogInErrorDomain Code=7 "The system account credentials are no longer valid and will need to be updated in the Settings app." UserInfo={NSLocalizedDescription=The system account credentials are no longer valid and will need to be updated in the Settings app.,

How to subclass TWTRTweetTableViewCell in Swift Twitterkit?

久未见 提交于 2019-12-08 07:19:05
问题 I am trying to find out if it is possible to subclass TWTRTweetTableViewCell from the TwitterKit library. So far I have my custom cell class inherit from TWTRTweetTableViewCell . The xib has a UIView in it which has an outlet to the cell class and the UIView class is set to TWTRTweetView . Like this- class UserTweetViewCell: TWTRTweetTableViewCell { @IBOutlet weak var tweetViewCustom: TWTRTweetView! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func

Cannot compose tweets with Twitter Kit 3

这一生的挚爱 提交于 2019-12-08 05:20:35
问题 I followed instruction from https://dev.twitter.com/twitterkit/ios/compose-tweets to compose tweets via my Object C app for iOS 11 // Objective-C TWTRComposer *composer = [[TWTRComposer alloc] init]; [composer setText:@"just setting up my Twitter Kit"]; [composer setImage:[UIImage imageNamed:@"twitterkit"]]; // Called from a UIViewController [composer showFromViewController:self completion:^(TWTRComposerResult result) { if (result == TWTRComposerResultCancelled) { NSLog(@"Tweet composition

Upgrading App to Swift 4 and iOS 11 - TwitterKit Issues

与世无争的帅哥 提交于 2019-12-07 13:35:47
问题 I'm trying to upgrade my app to latest iOS support. I've added TwitterKit via CocoaPods, and placed header in my Bridge Header. However; I am getting an error saying: Use of unresolved identified 'Twitter' - did you mean 'TWTRTTwitter'. func application(_ application: UIApplication, didFinishLaunchingWithOptions lauunchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { Twitter.sharedInstance().start(withConsumerKey:"MYKEY", consumerSecret:"MYSECRET") return true } This right out of the