如何共享Web应用程序与Facebook,微博等 [英] How to share web application with facebook, twitter etc
本文介绍了如何共享Web应用程序与Facebook,微博等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我做新闻applicaion在Android中使用RSS提要,现在我想分享一些新闻也就是我要上传从我的应用程序的Facebook链接,微博etc.Is这可能吗? 谢谢
i made news applicaion in android using RSS feed and now i want to share some news ie i want to upload links from my app to facebook, twitter etc.Is it possible? Thanks
推荐答案
试试这个:
findViewById(R.id.btnEnvoyer).setOnClickListener(
new Button.OnClickListener() {
public void onClick(View v) {
Intent sendMailIntent = new Intent(Intent.ACTION_SEND);
sendMailIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.Share_Mail_Subject));
sendMailIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.Share_Mail_Text));
sendMailIntent.setType("text/plain");
startActivity(Intent.createChooser(sendMailIntent, "Email / SMS / Tweet ?"));
}
}
);
工作就好在我的最新的应用程序,如果你想测试一下: COMIS试纸在布鲁塞尔
works just fine in my latest app if you want to test it : Comis Strips in Brussels
=>点击[菜单],然后选择[分享],然后按钮[发送电子邮件/短信/资料Tweet] = R.id.btnEnvoyer在我的布局文件,以查看替代品的用户可以选择从...
=> Hit [Menu], then [Share], then the button [Send Email / SMS / Tweet]=R.id.btnEnvoyer in my layout file to see the alternatives the user can choose from ...
希望这有助于你一点...
Hope this helps you a bit ...
小时。
这篇关于如何共享Web应用程序与Facebook,微博等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文