iOS 5 twitter usage - ios5

I have a full fledged iPhone application already developed for iOS 5 onwards. I have used a third party library for twitter integration. But it always keeps running into a problem for some reason or the other. How feasible is it to replace all that 3rd party stuff by iOS 5 native twitter functionality?

In order to implement twitter integration you have to import the Social framework on your project and also import it in your .h file
#import <Social/Social.h>
Then you have to add these lines of code on the method where you want to make a tweet.
SLComposeViewController *tweetVC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[tweetVC setInitialText:#"My tweet!"];
[self presentViewController:tweetVC animated:YES completion:nil];

Related

Twitter framework for iphone

I am trying to develop a Twitter based iPhone application which needs to send some Twitter messages and save those messages locally. But TWTweetComposeViewController in ios5 does not have the facility to save messages typed before clicking the send button. So I am thinking to use some third party frameworks for twitter integration.Please suggest me some good frameworks compatible with lower and latest ios versions.
Thanks in advance
try to use share kit sdk which will solve your problem i think ,
here is the link go through with this
http://getsharekit.com/install/

Send a tweet from an iPhone app

What is the best way to tweet from an iPhone app?
I know there are some libraries to integrate twitter in an iPhone app like MGTwitterEngine, do I really need it just to sent a tweet?
And what is OAuth? is MGTwitterEngine already include OAuth??
Can someone tell me what are the steps I need to do from start?
The app is for ios 4, so using the new twitter framework in ios 5 is not good for me..
If you are using iOS 5 there is a whole Twitter Framework built in. Otherwise you will have to use a third party library to do this.
https://developer.apple.com/library/ios/#documentation/Twitter/Reference/TwitterFrameworkReference/_index.html#//apple_ref/doc/uid/TP40011014
UPDATE
Please also do note that Apple will no longer accept anything that can not run on iPhone 5, so you will have to be use iOS 6 SDK or later anyway

Integrating Twitter into iOS 4.3+ App

I'm trying to integrate Twitter with my App right now. I have successfully set up the iOS 5 TWTweetComposeViewController, but this does not work on iOS 4.3. What's the best method to also integrate Twitter posting into iOS 4.3?
DETweetComposeViewController
Open source. Mimics TWTweetComposeViewController. Works with iOS 4 and later.
Sharekit is a framework that may help you to setup Twitter on iOS version pre 5. If you take a first look at Sharekit, it may look like you only can use it as a complete framework. But read on: you can use any of the fractions (Twitter, Facebook etc) of Sharekit to connect with your own GUI.
Use a custom library and implement the tweet screens yourself. Alternatively you could redirect the user to a twitter:// URL which will open the Twitter application, or just open a Web Intent. http://dev.twitter.com

How do I write an iphone app that uses the iOS5 twitter framework, but which will gracefully degrade on iOS4?

Our app can share items to facebook. We'd like to share to twitter too, but we don't want to use a thrid-party solution now that there's an official twitter framework. However, we don't want to make the app depend on iOS5 - what we'd like is to show a Twitter and Facebook button on iOS 5, but just the Facebook button on iOS 4. Is that possible? If so, what project settings do we need and how do we selectively show the button?
Rather than testing for a specific iOS version, Apple recommends testing for specific functionality when you need to degrade gracefully to support earlier versions. To do this you can weakly link the Twitter framework then test for its availability using:
if ([TWRequest class]) {
// Twitter framework is available: Enable button etc.
} else {
//Twitter framework is not available: Hide twitter button etc.
}
You would probably do this in the viewDidLoad method of the relevant view controller to configure your UI.
Have a look at the documentation for using weakly-linked classes.

how can i integrate google maps API for my iPhone application?

I want to use Google Maps on my iPhone application.
I am finding it difficult to get the xml parser code for it though.
The SDK includes the MapKit framework. See this google tutorial to get started.
Add the mapKit Framework to your framework folder.
In your viewController.h file add code:-
#import <MapKit/MapKit.h>
In your viewController.m file:-
[UIApplication sharedApplication openURL:[[NSURL alloc] initWithString: #"http://maps.google.com/maps?q=London"]]