3

Possible Duplicate:
Twitter Framework in IOS 6

I have integrated twitter framework in my iPhone project.But I am getting the error provided below.How can I Resolve it?

"undefined symbols for architecture i386:
 "_SLServiceTypeTwitter", referenced from:

     ___32-[ViewController TwitterAccount]_block_invoke_0 in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

"

Thanks in advance.

4

1 回答 1

2

检查以下步骤:

1.#import <Twitter/Twitter.h>

  1. 按钮动作

    • (IBAction)tweetTapped:(id)sender {

    if ([TWTweetComposeViewController canSendTweet]) { TWTweetComposeViewController *tweetSheet = [[TWTweetComposeViewController alloc] init]; [tweetSheet setInitialText:@"测试应用程序!:)"];

        if (self.imageString)
        {
            [tweetSheet addImage:[UIImage imageNamed:self.imageString]];
        }
    
        if (self.urlString)
        {
            [tweetSheet addURL:[NSURL URLWithString:@"http://www.gmail.in"]];
        }
    
        [self presentModalViewController:tweetSheet animated:YES];
    }
    else
    {
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Sorry" 
                                                            message:@"You can't send a tweet right now,You Setup The Twitter Account in iPhone Settings." 
                                                           delegate:self 
                                                  cancelButtonTitle:@"OK" 
                                                  otherButtonTitles:nil];
        [alertView show];
    }
    

    }

  2. 检查 Twitter.framework 是否可用:

检查屏幕

于 2012-10-29T07:51:29.457 回答