簡體   English   中英

在iOS中在Twitter上分享圖片

[英]Share image on twitter in IOS

您好,我想通過我的APP在Twitter上分享圖片。 我通過以下代碼成功地鳴叫了文本。如何用文本鳴叫圖像。

-(IBAction)updateTwitter{

    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]; 
        }  
    } 

    if([_engine isAuthorized]){
        [_engine sendUpdate:@"This is my first test"];  
    }
}

您是否考慮過使用iOS 5的Twitter Framework 特別是,請查看TWTweetComposeViewController ,它使您可以輕松添加圖像。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM