我想把推特和脸书整合成一个使用Cocos2D的游戏。我只想要一些简单的东西,比如在that上发布“我得了xxx分”,在Facebook页面上发布类似的消息,等等。我已经看到了很多让我的生活变得更容易的库-- ShareKit,AddThis等等--但我也读到过人们说它们并不是那么容易,不受支持,等等。
我可以去获取facebook和twitter SDK,并将它们集成到其中,但我想知道是否有人对我遗漏的东西有什么建议。我需要支持iOS4和5,所以我想这个库应该使用iOS5中内置的twitter特性。
对此有什么建议或评论吗--也许我错过了一些非常明显的东西?
发布于 2013-02-13 19:02:41
您可以使用以下代码在twitter上进行分享
twt = [[TWTweetComposeViewController alloc] init];
[twt setInitialText:@"Scorred 1000"];
[twt addURL:[NSURL URLWithString:@"url"]];
twt.completionHandler = ^(TWTweetComposeViewControllerResult result) {
switch (result) {
case TWTweetComposeViewControllerResultCancelled:
[twt dismissModalViewControllerAnimated:TRUE];
break;
case TWTweetComposeViewControllerResultDone:
//[self.navigationController popViewControllerAnimated:NO];
[self.navigationController popViewControllerAnimated:TRUE];
break;
default:
break;
}
[twt dismissModalViewControllerAnimated:TRUE];
};https://stackoverflow.com/questions/9532622
复制相似问题