首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ios中的Twitterkit 3.0 'TWTRInvalidInitializationException‘错误

ios中的Twitterkit 3.0 'TWTRInvalidInitializationException‘错误
EN

Stack Overflow用户
提问于 2017-06-20 19:01:53
回答 0查看 6.3K关注 0票数 1

我使用fabric没有问题,但自从新的twitterkit 3.0更新后,我遵循了所有的安装文档,但当我使用TWTRComposer时,我的应用程序崩溃了,并显示以下消息:“TWTRInvalidInitializationException”,原因:‘在应用程序设置中没有设置有效的Twitter Kit URL方案的情况下尝试登录或像推特一样。’似乎找不到解决方案。

代码语言:javascript
复制
// Swift
    let composer = TWTRComposer()

    composer.setText("just setting up my Twitter Kit")
    composer.setImage(image.image)

    // Called from a UIViewController
    composer.show(from: self.navigationController!) { (result) in
        if (result == .done) {
        print("Successfully composed Tweet")
        } else {
        print("Cancelled composing")
        }
    }

下面是应用程序委托didFinishLaunchingWithOptions代码

代码语言:javascript
复制
Twitter.sharedInstance().start(withConsumerKey:"xxxxxxxxxxxx", consumerSecret:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

以下是我的infoPlist代码

代码语言:javascript
复制
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>twitterkit-consumentkeyxxxxxxx</string>
            <string>fbkeyxxxxxxxxxxxx</string>
            <string>xxxxxxxxx</string>
        </array>
    </dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbapi</string>
    <string>fb-messenger-api</string>
    <string>fbauth2</string>
    <string>fbshareextension</string>
    <string>twitter</string>
    <string>twitterauth</string>
</array>

不是应用程序启动没有问题,但是当我在twitter上按下按钮进行分享时,twitter composer是call,并且在"composer.show“行上应用程序崩溃。我需要使用twitter sdk,因为ios11内置帐户功能删除中的更改

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44651236

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档