有人指出,这是一个重复的问题,是的部分,我遵循了其他帖子中的建议,并添加了如下所示的URLScheme,还建议我忘记添加到其他目标,所以我添加了URL twitter-13145245245624现在发生的是,我的应用程序将用户重定向到他们的Twitter应用程序,并要求允许我的应用程序使用他们的信息,一旦点击确定按钮,用户将被重定向回我的应用程序,但仍然没有作曲家填充查看推文。还是很困惑。谢谢你的帮助。
let composer = TWTRComposer()
composer.setText("just setting up my Twitter Kit")
composer.setImage(UIImage(named: "twitterkit"))
// Called from a UIViewController
composer.show(from: self) { (result) in
if (result == .done) {
print("Successfully composed Tweet")
} else {
print("Cancelled composing")
}
}这是我的info.plist,不过我在Facebook上发帖没有问题。有什么想法吗?
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-xxxxxxxxxx</string>
<string>fbxxxxxx</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>twitter</string>
<string>twitterauth</string>
</array>关于J
发布于 2018-03-28 09:06:53
我上面问题的问题是,我在AppDelegate中没有下面的方法。这解决了我的问题。
-(BOOL)application:(UIApplication*)app openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options{
return [[TWTRTwitter sharedInstance]application:app openURL:url options:options]; }
https://stackoverflow.com/questions/49434989
复制相似问题