共享到社交iphone本机代码

共享到社交iphone本机代码,iphone,cordova,share,Iphone,Cordova,Share,我想从我的phonegap应用程序向社交网络共享消息。为此,我正在为iphone和android创建插件 我找到了android的代码: String message = "Text I wan't to share." Intent share = new Intent(Intent.ACTION_SEND); share.setType("text/plain"); share.putExtra(Intent.EXTRA_TEXT, message); startActivity(Inte

我想从我的phonegap应用程序向社交网络共享消息。为此,我正在为iphone和android创建插件

我找到了android的代码:

String message = "Text I wan't to share."
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("text/plain");
share.putExtra(Intent.EXTRA_TEXT, message);

startActivity(Intent.createChooser(share, "Title of the dialog the system will open"));
但是我找不到iphone的代码。。您能帮助我吗?

您可以使用Phonegap团队的插件授权

  • 此插件提供了一种在中使用Facebook Graph API的简单方法 科尔多瓦
  • 此插件是为Cordova>=v2.1.0和ARC构建的。两个iOS& Android支持相同的javascript界面

Use也可以使用Dave johnson的,这也支持iOS和Android平台。

共享
Intent
是Android SDK的一部分,而不是iOS!iOS没有类似的功能,你只需要分别整合每个社交网络


您可能希望查看和了解facebook和twitter的集成,因为它们现在是iOS的一部分(twitter集成到iOS 5中,facebook集成到iOS 6中)。

谢谢Mayur。。但这只适用于facebook。。我想与所有社交网络分享信息。我不想为每个…创建单独的插件。。我正在尝试让插件分享味精到所有的社交网络。。。