如何在Facebook或Twitter上发布带有本地图像的格式化文本?

时间:2011-03-22 12:23:04

标签: iphone objective-c c xcode

我想使用我的应用程序在Twitter或Facebook上分享我当地保存的图像和格式化文本。

例如,我想在一个帖子中结合图像和粗体文本。

是否有可用的API?

2 个答案:

答案 0 :(得分:1)

我建议您在iOS应用中使用ShareKit

集成各种社交网站非常容易。

答案 1 :(得分:0)

我发现ShareKit很难用于分享到Facebook,Twitter或电子邮件这样的简单任务。因此我写了一个名为BMSocialShare的简单库。也许你想尝试一下?

BMFacebookPost *post = [[BMFacebookPost alloc] 
                        initWithTitle:@"Simple sharing via Facebook, Email and Twitter for iOS!" 
                        descriptionText:@"Posting to Facebook, Twitter and Email made dead simple on iOS. Simply include BMSocialShare as a framework and you are ready to go." 
                        andHref:@"https://github.com/blockhaus/BMSocialShare"];    

[post setImageUrl:@"http://www.blockhausmedien.at/images/logo-new.gif" 
         withHref:@"http://www.blockhaus-media.com"];

[[BMSocialShare sharedInstance] facebookPublish:post];