Manu Ram V
Manu Ram V

Reputation: 439

Pinterest Sharing From Android App using Intent

Pinterest Sharing From Android App using Intent is not working,Can somebody help me on this?

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"));

Upvotes: 0

Views: 594

Answers (1)

Mohamed ALOUANE
Mohamed ALOUANE

Reputation: 5407

Try this, but you should test if Pinterest is already installed in user's device.

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);

source

Upvotes: 1

Related Questions