使用Intent从Android应用程序共享Pinterest

使用Intent从Android应用程序共享Pinterest,android,android-intent,pinterest,Android,Android Intent,Pinterest,使用Intent从Android应用程序共享Pinterest不起作用,有人能帮我吗 Uri bmpUri = Uri.fromFile(imageFileToShare) shareIntent.setAction(Intent.ACTION_SEND); shareIntent.putExtra("com.pinterest.EXTRA_DESCRIPTION", "Messagessssssssss"); shareIntent.putExtra(Intent.EXTRA_STREAM,

使用Intent从Android应用程序共享Pinterest不起作用,有人能帮我吗

Uri bmpUri = Uri.fromFile(imageFileToShare)
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra("com.pinterest.EXTRA_DESCRIPTION", "Messagessssssssss");
shareIntent.putExtra(Intent.EXTRA_STREAM, bmpUri);
shareIntent.setType("image/*");
startActivity(Intent.createChooser(shareIntent, "Share Image"));

尝试此操作,但您应该测试用户的设备中是否已安装Pinterest

File imageFileToShare = new File(orgimagefilePath);

Uri uri = Uri.fromFile(imageFileToShare);

Intent sharePintrestIntent = new Intent(Intent.ACTION_SEND);
sharePintrestIntent.setPackage("com.pinterest");
sharePintrestIntent.putExtra("com.pinterest.EXTRA_DESCRIPTION", text);
sharePintrestIntent.putExtra(Intent.EXTRA_STREAM, uri);
sharePintrestIntent.setType("image/*");
startActivityForResult(sharePintrestIntent, PINTEREST);