Using Intent.ACTION_SEND share text on facebook

Asked

Viewed 878 times

0

I’m using the code below to share text with facebook. The problems is that other networks work, but facebook is blank. Someone’s been through it?

Intent compartilha = new Intent(Intent.ACTION_SEND);
compartilha.setType("text/plain");
compartilha.putExtra(Intent.EXTRA_SUBJECT, "Compartilhando frase");
compartilha.putExtra(Intent.EXTRA_TEXT, "Texto exemplo!");
startActivity(Intent.createChooser(compartilha, "Compartilhando"));
  • It seems to me that you found a Facebook bug that was not and will not be fixed... This problem is purposeful to force you to use the Facebook SDK for Android. Only this way is it possible to share correctly.

1 answer

0


This actually happens and is how it was designed, according to Facebook. Take a look at this bug report:

Jesse Chen Facebook Team

Hi Facebook Developers,

This Issue is going to be closed by design because our API does not support pre-filling the message for users as Seen in our Policy Documentation here (https://developers.facebook.com/docs/guides/policy/application_integration_points/) under Platform Policy IV.2.

Thanks, Jesse

In other words, if you try to send some Intent for Facebook with a text, they don’t know if the user wrote this or was another application. It simply ignores the text and lets the user actually write what he wants.

  • Thank you very much for your reply.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.