这是Facebook共享代码:
String text = "Offer Ends:" + offerending + "\n Offer Type:"
+ offertype + "\n Address:" + offaddress + "\n"
+ webbsuitee;
String completePath = Environment.getExternalStorageDirectory()
+ "/" + "temporary_file.jpg";
File file = new File(completePath);
// Uri imageUri = Uri.fromFile(file);
Uri imageUri = Uri.fromFile(file);
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.setType("image/*");
shareIntent.putExtra(Intent.EXTRA_TEXT, "Hello");
shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(shareIntent, "send"));