1
我使用以下代码进行twitter共享。在这里,我正在检查是否在设备中安装了twitter本机应用程序,然后我打开本机应用程序,否则我打开webView以供Twitter分享。使用下面的代码我能够做推特分享,但问题是,成功分享回拨后没有到我的应用程序,这是要推特应用程序。成功后,twitter共享回拨没有进入我的应用程序
NSURL *instagramURL = [NSURL URLWithString:@"twitter://post?message=hello%20world"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
[[UIApplication sharedApplication] openURL:instagramURL];
} else {
// <a href="twitter://tweet?text=I share this on Twitter from a website">Share this on Twitter</a>
GenericWebViewController *gwvController=[[GenericWebViewController alloc] init];
[gwvController loadWithUrl:[NSURL URLWithString:@"https://twitter.com/intent/tweet?url=www.google.com&text=I%20am%20eating%20branston%20pickel%20right%20now&original_referer=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F9127808%2Fhow-do-you-include-hashtags-within-twitter-share-link-text"] navBarTitle:@"Twitter"];
UIBarButtonItem *newBackButton = [[UIBarButtonItem alloc] initWithTitle: @"" style: UIBarButtonItemStyleBordered target: nil action: nil];
[[self navigationItem] setBackBarButtonItem: newBackButton];
[self.navigationController pushViewController:gwvController animated:YES];
//WI-542:Showing the navigation bar in WebView when user user navigate from deal details.
[self.navigationController setNavigationBarHidden:NO animated:NO];
}
如何成功共享后回到我的应用程序。