こんにちは私はこれらを使ってTwitterを統合したアプリケーションを開発していますTwitter-Oath-iPhone。 これらのライブラリは、ios5の下位バージョンで正常に動作しています。ios5でTwitterを使用するにはどうすればいいですか?このトラブルから私を助けてください。(ios 5)
(ios 5)
答えて
を置き換えることで試してみてください.....いつかシミュレータで動作するため、デバイスでそれをテストしていない場合がありbはこのコードを使用する代わりに"SA_OAuthTwitterEngine.m"
- (SA_OAuthTwitterEngine *) initOAuthWithDelegate: (NSObject *) delegate {
if (self = (id) [super initWithDelegate: delegate]) {
self.requestTokenURL = [NSURL URLWithString: @"http://twitter.com/oauth/request_token"];
self.accessTokenURL = [NSURL URLWithString: @"http://twitter.com/oauth/access_token"];
self.authorizeURL = [NSURL URLWithString: @"http://twitter.com/oauth/authorize"];
}
return self;
}
この1
0で、この機能この1つのスローブ私の問題........
Twitter integration for iOS 5 Tutorial:iOSの5のエキサイティングな新機能の
一つは、Twitterとの統合です。写真、YouTube、Safari、およびマップは完全に統合されています。ほとんどのiOS 5ユーザーがTwitterのバンドワゴンに乗って、TwitterのCEOによれば、Twitterの毎日のサインアップが3倍になり、ユーザーがあなたのアプリについてつぶやくことができるようになると、もっと多くの人の前に置くことができる。このiDevBlogADay投稿では、あなたのアプリをTwitterと統合するためのチュートリアルを書いています。
あなたは"SA_OAuthTwitterEngine.m"
クラス
で唯一のマイナーな変更があるため、新規の、IOSの5の非常に簡単にTwitterとの統合について"SA_OAuthTwitterEngine.m"
クラス
- (SA_OAuthTwitterEngine *) initOAuthWithDelegate: (NSObject *) delegate
{
if (self = (id) [super initWithDelegate: delegate]) {
self.requestTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/request_token"];
self.accessTokenURL = [NSURL URLWithString: @"https://twitter.com/oauth/access_token"];
self.authorizeURL = [NSURL URLWithString: @"https://twitter.com/oauth/authorize"];
}
return self;
}
でこの機能を置き換えIOS 5にAPIウェル作品を使用しましたios 5以降で追加されたフレームワークは、そこに続くステップ: 1. add twitter.framework 2. follow from twitter official site
Twitterのフレームワークを追加してこのコードを使用するだけで、Twitterの統合には非常に簡単な方法があります。リンクは以下です。あなたも は自分のビルドライブラリ からTwitter.framework
を追加し、ちょうどあなたのviewcontroller.hファイルで怒鳴るヘッダファイルをインポート..... iOS5を中Twiiterの作り付けの枠組みでこのコードを使用することができます
#import <Twitter/TWTweetComposeViewController.h>
もう一度だけインポート
#import <Twitter/TWTweetComposeViewController.h>
.....
- (IBAction)shareOnTwitter:(id)sender {
TWTweetComposeViewController *twitter = [[TWTweetComposeViewController alloc] init];
[twitter setInitialText:@"It's really that simple!"];
[twitter addImage:[UIImage imageNamed:@"yourimage.jpg"]];//if required
[twitter addURL:[NSURL URLWithString:@"your url link"]];//if required
[self presentViewController:twitter animated:YES completion:nil];
twitter.completionHandler = ^(TWTweetComposeViewControllerResult res) {
if(res == TWTweetComposeViewControllerResultDone)
{
UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Succes!" message:@"Your Tweet was posted succesfully" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
}else if(res == TWTweetComposeViewControllerResultCancelled)
{
UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Canceled" message:@"Your Tweet was not posted" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
}
[self dismissModalViewControllerAnimated:YES];
};
}
あなた と、このコードは、このヘルプは
- 1. iOS 5 MapKit、MKPlacemark、iOS 5でiOS 4.3アプリを実行中
- 2. iOS 5 - カメラオーバーレイクローン
- 3. IOS 5とTVOUT
- 4. iOS 5 - AFNetworking - アップロードビデオ
- 5. ios 5 uiwebview影
- 6. @autoreleasepool in ios 5
- 7. iOS 5ムービープレーヤー
- 8. IOS 5のUIStepper
- 9. iOS 5カスタムフォント
- 10. ios 5 - EXC_BAD_ACCESSエラー
- 11. iOS 5ネットワーキングライブラリ
- 12. iOS 5スタイルスイッチコントロール
- 13. IOS 5:イメージフィルタ
- 14. iOS 5ページカールカスタムビューコントローラ
- 15. iOS 5 Twitter API
- 16. iOS 5のfbconnect?
- 17. 3DビューフォールドアニメーションiOs 5
- 18. iOS 5ストーリーボードコメント
- 19. TwitterとiOS 5
- 20. iOS 5シミュレータ
- 21. AVFoundation iOS 5
- 22. iOS 5インスタンス変数
- 23. iOS 5、SpringBoard、SBCallAlert Alternative
- 24. IOS 5 SDKとSegues
- 25. iOS 5ストリーミングJSONエンドポイント
- 26. iOS 5、Xcode 4.2、ProtoBuf
- 27. IOS 5 - カスタムEMOJIアイコン
- 28. iOS 5 black transparent UIAlertView
- 29. iOS 5 cellForRowAtIndexPath Memory Leak
- 30. Geofence API for iOS 5