【问题标题】:Share hyperlink on twitter using socialize framework in iOS使用 iOS 中的 socialize 框架在 Twitter 上共享超链接
【发布时间】:2013-05-20 17:45:20
【问题描述】:

我正在使用Socialize 框架在 facebook 和 twitter 上进行分享。 我完全不知道如何使用这个框架在 twitter 上共享超链接。我彻底检查了它的 twitter 共享文档,但没有运气。如果您有任何线索,请在推特上分享超链接。

谢谢

【问题讨论】:

    标签: ios twitter socialize-sdk


    【解决方案1】:

    是的,您可以进行以下分享。

    #import "Social/SLComposeViewController.h"
    #import "Social/SLRequest.h"
    SLComposeViewController *socialVc=[SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
                        NSData *data = UIImageJPEGRepresentation(self.defaultImageView.image, 1.0);
                        [socialVc addImage:[UIImage imageWithData:data]];
                        [socialVc setInitialText:[NSString stringWithFormat:@"%@",@"hello"]];
                        [socialVc addURL:[NSURL URLWithString:@"www.xyz.com"]];
                        [self.navigationController presentViewController:socialVc animated:YES completion:nil];
    

    希望对你有所帮助。

    【讨论】:

    • 好吧,最初我只使用社交框架..但这是关于 Socialize SDK..socialize.github.io/socialize-sdk-ios/sharing.html.. 退房。在这里,我不知道如何为 twitter 分享添加超链接。感谢您的帮助。
    • k.但是如果你想要 ios 6 以上,那么你应该使用 go for apple 提供的控制器。
    • 不,这就是我切换到社交的原因,因为我也希望与 ios 5 兼容。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-28
    • 2014-04-01
    • 1970-01-01
    • 2018-01-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多