可能重复:
Twitter Framework in IOS 6
我在iPhone项目中集成了twitter framework
。但是我得到了下面提供的错误。我怎样才能解决它呢?
"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)
“
提前谢谢。
最佳答案
检查以下步骤:
1.#import <Twitter/Twitter.h>
按钮动作
(iBaction)TweetTapped:(ID)发件人{
如果([twtwtweetcomposiewcontroller cansendtweet])
{
twtwtweetcomposiewcontroller*tweetsheet=[[tweetcomposiewcontroller 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];
}
}
检查twitter.framework是否可用: