通过电子邮件,Facebook和Twitter共享Android应用程序

问题描述:

我需要通过电子邮件,Facebook和Twitter共享我的应用程序.我相信,对于Facebook和Twitter,它需要一个oauth.有人可以帮我提供源代码吗?

I need to share my application via Email, Facebook and Twitter. For Facebook and Twitter it need an oauth I believe. Can anyone help me out with the source code?

解决方案可以通过电子邮件共享,代码就像这样:


if(v.getId()== btnEmail.getId())
{

//Toast.makeText(this,"Please Contact .. \ n Sikbug.com",Toast.LENGTH_LONG).show();

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("plain/text");
intent.putExtra(Intent.EXTRA_EMAIL,new String [] {"}));
intent.putExtra(Intent.EXTRA_SUBJECT,"subject");
intent.putExtra(Intent.EXTRA_TEXT,邮件正文");
startActivity(Intent.createChooser(intent,"));

}
solution found for sharing via Email, the code goes lik this:


if(v.getId() == btnEmail.getId())
{

//Toast.makeText(this, "Please Contact..\n Sikbug.com", Toast.LENGTH_LONG).show();

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("plain/text");
intent.putExtra(Intent.EXTRA_EMAIL, new String[] { "" });
intent.putExtra(Intent.EXTRA_SUBJECT, "subject");
intent.putExtra(Intent.EXTRA_TEXT, "mail body");
startActivity(Intent.createChooser(intent, ""));

}