TwitterAgent Tutorial : Tweet from iPhone app in one line code with auto tinyURL
XAuth was not used in my classes, hope to integrate soon.Till then please use this: https://github.com/vodkhang/Twitter-XAuth-and-SharingVodkhang used the UI used in TwitterAgent with XAuth
Perhaps, you have used the FacebookAgent in your apps. I gratefully thank the fellows from iphonedevsdk.com and other iPhone developers who mailed me saying the class helped them. These are actual inspiration of sharing code with all.
Now, I would like to share my TwitterAgent class with you. Using TwitterAgent you can now integrate twitter in your iPhone app seamlessly. Additionally, you can also specify a URL and can make it tinyURL on the fly just passing an extra parameter!
Here are the steps:
1. Download TwitterAgent and BusyAgent and add them into your project.
2. Import TwitterAgent.h in the file where we want to use
3. Now call any of these function, they are self explanatory!
[[TwitterAgent defaultAgent] twit ]; [[TwitterAgent defaultAgent] twit:@"Search with google!" ]; [[TwitterAgent defaultAgent] twit:@"Search with google!" withLink:@"http://www.google.com" makeTiny:NO]; [[TwitterAgent defaultAgent] twit:@"Search with google!" withLink:@"http://www.google.com" makeTiny:YES];
Screenshots:
You only need to login once in one session. Login information will be saved to the device and will be used next time the application starts.
[[TwitterAgent defaultAgent] twit];
[[TwitterAgent defaultAgent] twit:@"Search with google!"];
[[TwitterAgent defaultAgent] twit:@"Search with google!" withLink:@"http://www.google.com" makeTiny:NO];
[[TwitterAgent defaultAgent] twit:@"Search with google!" withLink:@"http://www.google.com" makeTiny:YES];
Hope it will come into your help. Cheers!
-
Ksukumarraj
-
Satishkumar Iphone
-
Anouer Benhamouda
-
Varunsharma57
-
Daniel Nilsson
-
Praveen351
-
Edgar
-
S Patel08
-
Cristian Palandrani
-
Fiona
-
petardinew
-
Shaikh Sonny Aman
-
Twitter
-
Shaikh Sonny Aman
-
itsfall
-
Kvh
-
Alaasm24
-
Cristian Palandrani
-
Yash Patel
-
Rinku Sadhwani
-
Shaikh Sonny Aman
-
Anouer Benhamouda
-
Thiago Peres
-
Popoption
-
Jeff
-
Nea
-
SRIKANTH
-
Someone
-
Shaikh Sonny Aman
-
Baoust
-
Edgar Nunez
-
mahmud ahsan
-
Prithviraj
-
mozymac
-
ubers
-
kumar
-
ubers
-
Kumar
-
ubers
-
Shaikh Sonny Aman
-
ubers
-
ubers
-
ubers
-
ubers
-
kumar
-
Shaikh Sonny Aman
-
kumar
-
icanzilb
-
Shaikh Sonny Aman
-
icanzilb
-
Shaikh Sonny Aman
-
bunnyhero
-
Shaikh Sonny Aman
-
Alaa Nassef
-
Jeff
-
Jackie
-
Rev. Josh Paul
-
Shaikh Sonny Aman
-
Vic
-
Shaikh Sonny Aman
-
Rob
-
Shaikh Sonny Aman
-
Rob
-
leo888
-
Shaikh Sonny Aman
-
uriash
-
Shaikh Sonny Aman
-
uriash
-
Shaikh Sonny Aman
-
exe
-
Shaikh Sonny Aman
-
Alon Ezer
-
Shaikh Sonny Aman
-
Shaikh Sonny Aman
-
Jabroni
-
Shaikh Sonny Aman
-
ubers
-
Shaikh Sonny Aman
-
ubers
-
Shaikh Sonny Aman
-
Guest
-
Shaikh Sonny Aman
-
Faiz Rasool



(6 votes, average: 3.83 out of 5)
![[[TwitterAgent defaultAgent] twit];](http://amanpages.com/wordpress/wp-content/uploads/2010/01/Picture-7.png)



