IOS7 - SLComposeViewController - 发布到Twitter时出错 - 无法发送推文 - 连接失败 [英] IOS7 - SLComposeViewController - Error posting to Twitter - cannot send tweet - connection failed

查看:2930
本文介绍了IOS7 - SLComposeViewController - 发布到Twitter时出错 - 无法发送推文 - 连接失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用IOS7 SLComposeViewController 来实现Twitter帖子,我收到以下错误 -

I'm trying to implement a twitter post using IOS7 SLComposeViewController and I get the following error -


由于与Twitter的连接失败,因此无法发送推文blah blah。

The Tweet "blah blah" cannot be sent because the connection to twitter failed.

我包括图片和我的推文中的网址 - 如果这有任何区别..

I am including image and URL in my tweet - if that makes any difference..

以下代码 -

SLComposeViewController *composeController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];

[composeController setInitialText:@"i ran with 18 chickens under my armpits for 18 hours"];
[composeController addImage:[UIImage imageNamed:@"zoeLrg.png"]];
[composeController addURL: [NSURL URLWithString:
                            @"http://www.nme.com"]];

[self presentViewController:composeController
                   animated:YES completion:nil];

SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result){
    if (result == SLComposeViewControllerResultCancelled) {

        NSLog(@"delete");

    } else

    {
        NSLog(@"post");
    }

    [composeController dismissViewControllerAnimated:YES completion:Nil];
};
composeController.completionHandler =myBlock;


推荐答案

您可以检查调试控制台以查看错误是什么回?通常,这些消息将提供更多信息。此外,如果您的设备上配置了多个帐户,则会出现与之相关的开放雷达问题,这可能适用于您的情况。请查看 http://www.openradar.me/radar?id=5262535380959232

Can you check your debug console to see what error is returned? Typically, those messages will be more informative. Also, if you have multiple accounts configured on your device, there is an open radar issue related to it which may apply in your case. Please check http://www.openradar.me/radar?id=5262535380959232.

这篇关于IOS7 - SLComposeViewController - 发布到Twitter时出错 - 无法发送推文 - 连接失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆