iphone - 当我尝试在我的 iPhone 项目中添加 Twitter 框架工作时,出现此错误 : OBJC_CLASS$_SLRequest. 我该如何解决

标签 iphone objective-c xcode twitter

<分区>

Possible Duplicate:
Twitter Framework in IOS 6

我在我的 iPhone 项目中集成了 twitter 框架。但是我收到下面提供的错误。我该如何解决它?

"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>

  1. 按钮操作

    • (IBAction)tweetTapped:(id)发件人{

    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 是否可用:

Check the Screen

关于iphone - 当我尝试在我的 iPhone 项目中添加 Twitter 框架工作时,出现此错误 : OBJC_CLASS$_SLRequest. 我该如何解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13117659/

相关文章:

ios - subview 的子层与更高的 subview 重叠

ios - 如何在 userDefaults swift 中进行循环

jquery - 在 Web 应用程序中从一个屏幕滑动到另一个屏幕

iphone - 如何禁用 UIActionSheet 中的按钮?

ios - iphone 上的 CSS 输出与 PC 不同

iphone - 我如何更改 UILocalNotification 中的 UserInfo?

ios - 创建自定义 Collection View 布局

iphone - 核心数据 - 保存电子邮件地址

iphone - NSMutableURLRequest 超时不起作用

ios - 尝试将 UIButton 连接到代码时出现 "Object Exit"功能