Tutorial Details
- Technology: iPhone SDK 4.x
- Difficulty: Intermediate
- Completion Time: 30 - 45 Minutes
- IDE: Xcode 4
This tutorial will show you how to quickly integrate the Twitter API with the iPhone SDK using Twitter-OAuth-iPhone, a plug-and-play Twitter library for the iPhone composed of multiple open-source projects combined and synthesized for ease of implementation by Ben Gottlieb.
NOTE: With the release of iOS 5, this article is now outdated. Moving forward, you should seriously consider using the Twitter Framework that ships with the iOS 5 SDK. Only consider implementing the solution demonstrated here if you must support users on older versions of iOS. A tutorial demonstrating the use of the Twitter Framework will be released on Mobiletuts+ in the coming weeks.
Project Setup
This tutorial will use a simple application called “TwitterRush” to demonstrate Twitter OAuth integration for the iPhone. By downloading the TwitterRush application, you will be able to precisely follow all steps in this tutorial. However, if you already have an iPhone project that you would like to connect with the Twitter API, you should still be able to follow along in your own code with only slight modifications.
In addition to TwitterRush or your own project, you will also need to download Ben Gottlieb’s Twitter-OAuth-iPhone project available on GitHub.
Step 1: Copy the Twitter+OAuth Folder
After downloading and unarchiving the Twitter-OAuth-iPhone library, drag the folder entitled “Twitter+OAuth” into the “Other Sources” folder in the Xcode 4 navigator area. Be sure to check the “Copy items into destination group’s folder (if needed)” option and click “Finish.”
Trying to compile and run your application now will result in A LOT of errors (90 at the time of this writing with iOS SDK 4). Not to worry: we will easily fix all of them in Step 2.
Step 2: Add the libxml2 Library
In the navigator area of Xcode 4, select the project name (in this case “TwitterRush”). Next, select the current target (“TwitterRush” here again), and then select the “Build Phases” tab. Expand the “Link Binary With Libraries” option, and then click the “+” button to add a new framework. Type “libxml2″ into the search box, and select the libxml2.dylib library that appears in the list. Click “Add” to include this library in the linking phase of your project.
After completing these steps, your screen should look something like this:
After adding the library to your project, you will need to modify the “header search paths” setting in your project’s build settings. To do this, deselect the target and select the actual TwitterRush Project. Open the “Build Settings” tab and search for the “Header Search Paths” entry. Double click this setting and then click the “+” button in the bottom left of the pop-up dialogue to add a new search path. Click the “recursive” check box, double click the “Path” field, and enter the following dynamic path:
$(SDKROOT)/usr/include/libxml2
After clicking “Done”, your screen should look similar to this:
If you run the application from the Xcode menubar, you should now be able to build the application without any compile errors!
Step 3: Declare the NSXMLParserDelegate Protocol
While you are now able to compile and run the application without any errors, there are a number of warnings related to changes in the iOS4 SDK and the NSXMLParserDelegate protocol. You will need to explicitly declare that MGTwitterStatusesParser.h and MGTwitterXMLParser.h conform to this protocol in order to prevent these warnings from occurring.
To do so, open the MGTwitterStatusesParser.h file and modify the @interface declaration by declaring the NSXMLParserDelegate protocol like so:
@interface MGTwitterStatusesParser : MGTwitterXMLParser <NSXMLParserDelegate> {
Now do the same for MGTwitterXMLParser.h, modifying the @interface declaration to read:
@interface MGTwitterXMLParser : NSObject <NSXMLParserDelegate> {
You should now be able to smoothly compile the application without generating any errors or warnings! We’re now ready to begin integrating the Twitter-OAuth-iPhone library with our code.
Step 4: Import SA_OAuthTwitterController.h & Declare SA_OAuthTwitterEngine
We now need to begin importing the library classes that we will use to connect with the Twitter API. Open TwitterRushViewController.h and modify the code to read as follows:
#import <UIKit/UIKit.h>
#import "SA_OAuthTwitterController.h"
@class SA_OAuthTwitterEngine;
@interface TwitterRushViewController : UIViewController <UITextFieldDelegate, SA_OAuthTwitterControllerDelegate>
{
IBOutlet UITextField *tweetTextField;
SA_OAuthTwitterEngine *_engine;
}
@property(nonatomic, retain) IBOutlet UITextField *tweetTextField;
-(IBAction)updateTwitter:(id)sender;
@end
On line 2, we import the SA_OAuthTwitterController class for use within our view controller. On line 4, we forward declare the SA_OAuthTwitterEngine class so we can declare an instance of that class in the @interface without actually importing the header file. On line 6 we declare the SA_OAuthTwitterControllerDelegate protocol -this will allow us to easily respond to Twitter API events later. Finally, on line 10 we declare the _engine object as an instance of the SA_OAuthTwitterEngine class.
Now switch to the TwitterRushViewController.m file. Import the SA_OAuthTwitterEngine class that we just forward declared in the class interface:
#import "SA_OAuthTwitterEngine.h"
Because the SA_OAuthTwitterControllerDelegate only contains optional method declarations, at this point you should again be able to compile and run your application without any errors or warnings.
Step 5: Define Your Twitter API OAuth Credentials
In order to gain OAuth access to the Twitter API, you will need to first create a Consumer Key and a Secret Key for Twitter to be able to identify and authenticate your application. You can do this from the Twitter web site by logging into your account and navigating to the app registration form. When going through the registration process, be sure to specify “client” as the application type, check the “Yes, use Twitter for login” box, and select “Read & Write” as the default access type to enable your iPhone app to post tweets on behalf of your users.
After you have registered your application and Twitter has generated your application credentials, add the following to TwitterRushViewController.m above the class @implementation:
#define kOAuthConsumerKey @"Your consumer key here" //REPLACE With Twitter App OAuth Key #define kOAuthConsumerSecret @"Your consumer secret here" //REPLACE With Twitter App OAuth Secret
We will use these constants momentarily when we instantiate our _engine object.
Step 6: Launch the Twitter Login Screen
For our use-case, we want to initialize the _engine object when our ViewController is created and then display the Twitter OAuth login screen as soon as the view controller finishes loading. To initialize the _engine object, modify the viewDidAppear method to read as follows:
- (void)viewDidAppear: (BOOL)animated {
if(!_engine){
_engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
_engine.consumerKey = kOAuthConsumerKey;
_engine.consumerSecret = kOAuthConsumerSecret;
}
}
Now go ahead and release the _engine object in our view controller’s dealloc method:
- (void)dealloc {
[_engine release];
[tweetTextField release];
[super dealloc];
}
After our view finishes loading, we want to immediately launch the Twitter login screen. To do so, you will need to again modify the viewDidAppear method like so:
- (void)viewDidAppear: (BOOL)animated {
if(!_engine){
_engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
_engine.consumerKey = kOAuthConsumerKey;
_engine.consumerSecret = kOAuthConsumerSecret;
}
UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];
if (controller){
[self presentModalViewController: controller animated: YES];
}
}
If you run the application now, you’ll see that we are successfully presenting the Twitter login screen whenever our custom view is displayed. However, there is one major problem with this setup: the login screen will always be displayed when the view appears, even if the user has already logged in. We need to add a conditional that will only display this control if the user has not yet been connected via OAuth.
To do this, add the following conditional before displaying the view:
if(![_engine isAuthorized]){
UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];
if (controller){
[self presentModalViewController: controller animated: YES];
}
}
The isAuthorized method will return a boolean value of TRUE if we have an OAuth authentication token. So, this conditional simply tests whether we do not have authorization, and then displays the Twitter login when needed.
For the isAuthorized method to work, we also need to add the following SA_OAuthTwitterEngineDelegate protocol methods responsible for storing our OAuth authentication token after the first login:
//=============================================================================================================================
#pragma mark SA_OAuthTwitterEngineDelegate
- (void) storeCachedTwitterOAuthData: (NSString *) data forUsername: (NSString *) username {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject: data forKey: @"authData"];
[defaults synchronize];
}
- (NSString *) cachedTwitterOAuthDataForUsername: (NSString *) username {
return [[NSUserDefaults standardUserDefaults] objectForKey: @"authData"];
}
Step 7: Post Updates to Twitter
In what is perhaps the simplest step of the entire process, add the following single line of code to updateTwitter, our custom IBAction method, to actually post an update to Twitter:
[_engine sendUpdate:tweetTextField.text];
Voila! You should now be posting updates to your Twitter feed. However, we aren’t quite finished yet. What happens if our application fails to post the update? What if we wanted to present a confirmation view if the tweet is posted successfully? Thankfully, the TwitterEngineDelegate protocol has two methods defined for just this purpose.
Add the following code to TwitterRushViewController.m:
//=============================================================================================================================
#pragma mark TwitterEngineDelegate
- (void) requestSucceeded: (NSString *) requestIdentifier {
NSLog(@"Request %@ succeeded", requestIdentifier);
}
- (void) requestFailed: (NSString *) requestIdentifier withError: (NSError *) error {
NSLog(@"Request %@ failed with error: %@", requestIdentifier, error);
}
You can see that the application will now log success and failure messages to the console depending on what happens after we click the “Tweet” button. This behavior can be easily modified to match the needs of your own apps.
Conclusion
If you have followed the step-by-step instructions above, you should now be able to post status updates to Twitter on behalf of your users!
The full TwitterRushViewController.h file should now look like this:
#import <UIKit/UIKit.h>
#import "SA_OAuthTwitterController.h"
@class SA_OAuthTwitterEngine;
@interface TwitterRushViewController : UIViewController <UITextFieldDelegate, SA_OAuthTwitterControllerDelegate>
{
IBOutlet UITextField *tweetTextField;
SA_OAuthTwitterEngine *_engine;
}
@property(nonatomic, retain) IBOutlet UITextField *tweetTextField;
-(IBAction)updateTwitter:(id)sender;
@end
The full TwitterRushViewController.m file should read:
#import "TwitterRushViewController.h"
#import "SA_OAuthTwitterEngine.h"
/* Define the constants below with the Twitter
Key and Secret for your application. Create
Twitter OAuth credentials by registering your
application as an OAuth Client here: http://twitter.com/apps/new
*/
#define kOAuthConsumerKey @"Your Key Here" //REPLACE With Twitter App OAuth Key
#define kOAuthConsumerSecret @"Your Secret Here" //REPLACE With Twitter App OAuth Secret
@implementation TwitterRushViewController
@synthesize tweetTextField;
#pragma mark Custom Methods
-(IBAction)updateTwitter:(id)sender
{
//Dismiss Keyboard
[tweetTextField resignFirstResponder];
//Twitter Integration Code Goes Here
[_engine sendUpdate:tweetTextField.text];
}
#pragma mark ViewController Lifecycle
- (void)viewDidAppear: (BOOL)animated {
// Twitter Initialization / Login Code Goes Here
if(!_engine){
_engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
_engine.consumerKey = kOAuthConsumerKey;
_engine.consumerSecret = kOAuthConsumerSecret;
}
if(![_engine isAuthorized]){
UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];
if (controller){
[self presentModalViewController: controller animated: YES];
}
}
}
- (void)viewDidUnload {
[tweetTextField release];
tweetTextField = nil;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
- (void)dealloc {
[_engine release];
[tweetTextField release];
[super dealloc];
}
//=============================================================================================================================
#pragma mark SA_OAuthTwitterEngineDelegate
- (void) storeCachedTwitterOAuthData: (NSString *) data forUsername: (NSString *) username {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject: data forKey: @"authData"];
[defaults synchronize];
}
- (NSString *) cachedTwitterOAuthDataForUsername: (NSString *) username {
return [[NSUserDefaults standardUserDefaults] objectForKey: @"authData"];
}
//=============================================================================================================================
#pragma mark TwitterEngineDelegate
- (void) requestSucceeded: (NSString *) requestIdentifier {
NSLog(@"Request %@ succeeded", requestIdentifier);
}
- (void) requestFailed: (NSString *) requestIdentifier withError: (NSError *) error {
NSLog(@"Request %@ failed with error: %@", requestIdentifier, error);
}
@end
Thanks for reading this tutorial on the Twitter-OAuth-iPhone library, and a very special thanks to Ben Gottlieb, Matt Gemmell, Jon Crosby, Chris Kimpton, and Isaiah Carew. Without their hard work, implementing the Twitter API with the iPhone SDK would take many, many more steps to achieve.
Have questions or comments on this tutorial? Leave them in the comments section below or message @markhammonds directly on twitter. Bonus points for completing this tutorial and using the TwitterRush application to send me a shout out!

Hi,
has someone configured this tutorial to work with another oauth service different from twitter?
I’m try to do it, but it’s a lot complicated!
Now i’m getting ok from the authentication process, but at the first call of the rest api i’m getting an http error 400.
Any suggestion?
Thanks!
Tuma
hi ..im trying to implement this code ..i follwed all step but for some reasons im getting libxml 140 errors ..please help me out ..great thnx!!
Hey,
thanks for the tutorial…
I have a few simple questions :
1. how can I display the username of the logged in user?? what is the var to use?
2. how can I allow users to logout?? I have :
-(void) loguserOut{
[logOut setTitle:@"Working..." forState:UIControlStateNormal];
[_engine endUserSession];
}
but it doesnt do anything!!! :S
Thanks alot
thanks for the tutorial!!!it’s work very well!! but i have a question when appear che login view and i push the cancel or deny button for login the view disappear and then appear again, i can’t exit the view if i don’t login…how i can abort the login?
Hi, great tuto ! Very helpful.
I just would like to add a small thing but I don’t how to make it.
I’d like to send a pre-formated message just after the user did its authentication and accept my twitter app to access its twitter.
Is it possible ?
thanks
neospirit
Help me about the logout
i’ve just tried it but get the following response on the iPhone Simulator
Woah there!
This page is no longer valid. It looks like someone already used the token information you provided. Please return to the site that sent you to this page and try again … it was probably an honest mistake.what’s the problem.I tried with your Keys and also with my keys.
what’s wrong? my keys are valid and tested them on another platform and working greatly.
i think the problem is from the API , am i right
I have integrated Twitter in my iPhone application.
The issue is; When I click on “Authorize app” or “No, Thanks” buttons, it is taking too much time to leave the twitter view controller. (nearly upto 5 min)
I don’t know why i am getting this issue.
I tested with your source code also, but same issue.
Any suggestions ?
Hi Mark! Thanks for your tutorial, its very nice and easy to follow, but i have a question.
The authentication process run well, but at the moment when I need to send a tweet, I have the next message
2011-05-16 13:45:46.134 TwitterRush[6516:207] Request 7359EA2B-8766-45A4-834E-FAE2D9FD77D2 failed with error: Error Domain=HTTP Code=401 “The operation couldn’t be completed. (HTTP error 401.)”
Could you tell me, why this error? The same thing in your Demo
Thanks a lot for your attention
Please check if you app on Twitter is in Read only Mode.
This could be one of the reason.
Hi!, why do you delete my question? I think it was important, but thanks any way.
Great tutorial, however little problem.
I still get tons of errors at the end of step two. I am doing it with a brand new, clean view-based application, 4.2. Any ideas?
Mate, I love the Tutorial, and it’s saved my ass, BUT, I ‘m trying to integrate it into my own app. I’ve followed every damn thing, no errors, builds and runs, but as soon as I hit my Tweet Button, it crashes the app. I’ve put the ViewController OAuth to pull up in the View Did Appear/WillAppear but it doesn’t even do THAT. What’s WRONG!? *pulls hair out*
Hi,
I also get a 401 error when authData is cached ( cachedTwitterOAuthDataForUsername )
Bump!
Hi all,
I got error “the operation couldn’t be completed. (HTTP error 403)” when sending message.
Please help
Many Thanks
I dl it yesterday and it ran right “OOB”. :)
But when i log into my twitter account on the login view, i get this;
woah…it originally said there was an error like something on that page had expired. now i got redirected to my callback url or url…and it reads a bar underneath the nav bar::
Select and Copy the PIN…and it wont let me leave the auth page. any idea why?
Thanks for this tutorial, successfully added into my app but first encounter libxml2 error and able to fix it by following carefully step #2.
Thanks
Another thank you Mark for the tutorial!
Integration into my app went pretty straight, then I was able to do some customizations.
Keep up the good coding. :)
Hi i have the twitter feed showing in my app successfully. However, I would like to be able to login automatically and make it follow an existing account. i.e. it logins and displays @DietCokeUS.
Can anyone give me advice as to how i got about doing this?
Hi,
Thanks for the tutorial but when am getting login at first am getting the view of textfield and button.
how to remove it.
The tutorial is working great on Simulator. When i launched it from a device it gives me a HTTP 403 error.
Here is the error message: Request 8C448E18-95D6-4799-8E0B-B53505A24840 failed with error: Error Domain=HTTP Code=403 “The operation couldn’t be completed. (HTTP error 403.)”
Any help would be appreciated.
Thanks,
Sanoj
HI
i am developing the twitter connect in iPhone app. what my pblm is, when i set application type is “Browser” its throwing error like Request for member “pin” is something not a structure or union error. any one solve my pblm. also thanks for the great tutorial.
Thanks in advance
chandralekha.M
Hello Everyone,
I am using MGtwitterEngine to integrate twitter in my iPhone application. EVerything is running fine except the Search user functionality. I have tried every possible way to solve this problem but did’t get any success. I am getting error code 403 in reponse.
Did anyone find any solution on this? I will really appreciate any help.
Thanks in Advance.
Did you get it to work with multiple views?
Hi guys,
Maybe a stupid question. Anyway I got everything working but when I use the getuserTimelineFor it retruns a NSString. The only string i’m getting back from the api is the request identifier code.
NSString *timelineInString = [[NSString alloc] init];
timelineInString = [_engine getUserTimelineFor:@"joostpielage" sinceID:nil startingAtPage:1 count:10];
.
This is what the NSLog looks like. Seems fine to me…
2011-07-04 19:34:21.120 getTimeline[13803:207] Request 7D2BEBEE-AE0F-4143-8502-A7F4E5C27F41 succeeded
Am I doing something wrong? Can someone please help me? I can’t figure it out.
Thanx in advoance,
Joost
Hi,
Thanks for such a great tutorial.
I have a two simple questions :
1. How can user to logout from twitter app?
2. How could I display the username of the logged in user?
Thanks a lot in Advance..
Hi,
Logout problem solved, just add this function to your application and called it from the button event:-
-(void) logoutFromTwitter
{
[[NSUserDefaults standardUserDefaults] removeObjectForKey:[NSString stringWithFormat:@"authData"]];
}
Thanks,
Aanchal
Hey Anchal,
you are correct , but when i use your code , it returns a new view for twitter, here there is no login window for user,contanis only a application registration window
Dear Mark or anybody
Do you have sources of OAuthConsumer with pin support? I like to port this project for mac os, but libOAuth.a build only based on i386 arch, and compiler don’t see OAToken end other symbols.
Hi,
Thank you for the tutorial…
but I am getting the error Error Domain=HTTP Code=401 “The operation couldn’t be completed. (HTTP error 401.)” when the tweet button is pressed.
Can anyone help me??
Thanks in advance..
Thanks a lot for the tutorial.
I am also getting the same error as User14
Error Domain=HTTP Code=401 “The operation couldn’t be completed. (HTTP error 401.)”
Could anyone please help me out on that? Would be really helpful
Fixed the 401 error. The issue what that application would have a Read only (default) permission.
You can update the permission settings to Read/Write under “Home/MyApplications” and in the Settings tab under it.
Thanks,
Dexter
Hi
I am not able to post tweets to the profile.The control is not going to the view where posting tweet is present and also following message is displayed.
“Select and Copy the PIN”.can someone plz help?
Hi,
can u elaborate the use of TWITPIC_API_KEY in the method.It is to be replaced by which key parameter or do we have to define it with some value.
//USED WHILE POSTING THE IMAGE AS TWITPIC
-(IBAction)didPressPostImage:(id)sender {
[req setPostValue:TWITPIC_API_KEY forKey:@"key"];
}
Thanks
Vikas
Hi,
can u elaborate the use of TWITPIC_API_KEY in the method.It is to be replaced by which key parameter or do we have to define it with some value.
//USED WHILE POSTING THE IMAGE AS TWITPIC
-(IBAction)didPressPostImage:(id)sender {
[req setPostValue:TWITPIC_API_KEY forKey:@"key"];
}
Thanks
Vikas
It is great work, thanks so much.
I’ve problem with sending reply tweet using
– (NSString *)sendUpdate:(NSString *)status inReplyTo:(unsigned long long)updateID this method.
anybody have ever like this. Sending tweet but it not a reply tweet.
“in_reply_to_status_id” = “” field being empty. replying tweet important for my project. pleeessseee help urgent…
Hi all,
Thanks for this great job, it’s a real life saver.
Everything just worked flawlessly for me unless I tried to use “– (NSString *)sendUpdate:(NSString *)status inReplyTo:(unsigned long)updateID” method.
At first, I had to change the type of updateID from “unsigned long” to “unsigned long long”, otherwise some part of the updateID parameter was truncating(because of the 32 bit issue I guess, as I’m trying on IOS).
After that everything seemed working, I was using the method above for replying a tweet and my reply tweet is sent to twitter perfectly but the problem is it does not appear to be a “reply tweet”; it just appeared as a usual tweet.
When I check the response of my reply tweet above everything seems OK except that “in_reply_to_status_id” field seems empty which explains the situation(my reply tweet seems like a usual tweet) I tried to explain above.
So, is there anyone encountered something like this and has a solution.
Thanks…
Hi, Mark,
Thanks for an incredible tutorial. I hate that it has to be this complicated, though. I’m looking to add to my App a simple function that will just allow a user to tweet to his friends about the app. I don’t need to allow users to read their tweets.
I went through your tutorial. The latest download seems to have all of your changes already there, and it compiles in Xcode 4, but it still helps for me to step through it.
When I run the app, I get a screen with a pink box that comes up on top of your “tweet” .xib. The box says, “Woah there! This page is no longer valid. It looks like someone already used the token information you provided. Please return to the site that sent you to this page and try again … it was probably an honest mistake.”
Then there is a link to send me to Twitter, but I can’t ever get to your .xib.
I have a good consumer key and consumer secret, and I seem to be logged in when I run the project. Does the key and secret log me in?
Also, though, when I look at my “Applications” on my page on Twitter’s Web site, it says that the app is for read-only, even though I asked for read-write. When I try to change the setting to read-write, it just stays read only.
Also, I don’t know what to put for the “Callback URL”, and I don’t know if this would be an “Anywhere” application.
Am I too naive about all this to get it working? Can you suggest what to do to get TwitterRush working for me?
Thanks!
–Steve D.
Hmm. Twitter is now saying that my Access Level is “read and write”. Same problems with TwitterRush, though.
Hi,
I have tried your code..I got login but i am unable to send tweet.
when i tap on Tweet button it faild with the following error
2011-08-10 22:09:22.426 TwitterRush[732:207] Request 821CCDBF-F51B-45C5-B493-DDD10B129DE4 failed with error: Error Domain=HTTP Code=401 “The operation couldn’t be completed. (HTTP error 401.)”
Also i would like to know..
How can i logout ??
Thnxx in advance
Bump?
Hi,
Thanks for sharing useful tips of Twitter to implement in i phone application and After Read entire step, I going to implement this thing and i got error authorized failure than what should i do?
Thanks
Hey.
Lot of people are having trouble with the HTTP 401 error.
So the solution is to go to your twitter app and in Settings set Application Type to “Read and Write”.
Now i tried this and the app still gave me the same error. I then opened my twitter account ( the one you are using to login). Click on Settings and Applications and check what the access is against the app that you’ve made. In case it is Read only, revoke access, go to your iPhone simulator and Reset Content and Settings (you can do this by clicking iOS Simulator on the menu on top of your screen) . Compile the program again and try checking the Reads-Write access in your twitter account now.
This worked for me because basically when i ran the program for the first time, the Application Type was set to Read Only. Changing the Application Type after that doesn’t make a difference.
ps: I left the Callback URL blank.
In the step 6, where’s the “Yes, use Twitter for login” in the developer page??? I can’t see that box…
@Edwin > same as you ! cannot see this option !
I followed this tutorial and adapted it following my app.
Everything seems to work fine : the view asking me to authorize the app does appear, then clicked YES and… now each time, the user want to tweet, nothing happens : none view appear !
I guess it is relative to this unexisting option :s
Yeah ok ! sorry, I should read the tutorial’s title before adding comment…
Is it safe to include your key and secret in your app? Can’t other people reverse engineer it?
Thanks for the tutorial, Followed the steps and I have a strange problem.
After login and authorizing the app I get a blank grayish screen, any thoughts on how to fix this?
I checked my twitter application settings and I have them to read & write and no callback URL.
I have to clear and reset the settings on the iOS simulator and I get the login screen again but I’m back to square one every time.
Thanks for any and all help
Figured it out. The gray screen is actually the view where the button, text input and label are to be. Just needed to add them and link them to the correct controls.
Hi
Thanks for the great tutorial ,it is woking very fine but i m having a problem is this ” when i press post button nothing is post on the twitter ” so plz give me some tips.
I have entered key and secret key carefully but post button is not able to post tweet on twitter .
Thanks for this great Tout.
Thanks a lot for a very well delivered tutorial. I am using cocos2d for developing my app and have integrated the above api into my code. The problem I am facing right now that SA_OAuthTwitterController is not presented when I call it. The following message appears in the console:
NSURLRequest default cookie store will be required for http://twitter.com/oauth/request_token
Any idea what I am doing wrong?
Please help as I am badly stuck here..:(
Waiting for your response…
Has anyone noticed that the “Authorize app” button on the Twitter login screen is very unresponsive, sometimes it takes 3 pushes for it to register?
Hi, i managed to make it work, it compiles without any errors or warnings, but i get bad acces after [OAMutableURLRequest URLEncodedString:] , and i couldn’t solve it because i cannot see the .m file.
Can anybody tell the problem? (It works on your sample code, i did the same things)
Hi,
I’ve tried to send the message. I’ve pushed the Tweet button, but nothing happens. What do I have to check, to check where the tweet goes to?
Is there a quit button yet for this app?
ICA
Hi,
That’s a great tutorial. Thanks for the tutorial.
It works very well. Problem is that, in this tutorial POST methods are worked very well. just like(sendDirectMessage, sendUpdate, etc) but GET method are not working. When i send a request for a GET method for some specific data it returns a connection string (Just like: Request 2D6B805D-2F5D-4BD2-8E5D-2559E29DB3E2 succeeded).
Now how can i find the actual data in my view controller class…???