I am trying to share my app (link having data and metatags) with the following code
String s = "http://www.myapp.com"
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
String linkt = "<a href=" + s + ">"+ s + "</a>" ;
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(linkt));
startActivity(Intent.createChooser(sharingIntent,"Share using "));
(1)
When I click on facebook in the share options, it crashes with the following error.
“The application facebook (process com.facebook.katana) has stopped unexpectedly. Please try again.” What is the reason for this crash ?
(2) when I click google+ , only the link is shown and not with all meta tag data from the link where it will extract image and description etc.
Ofcourse, if I go to google+ from the PC browser and post the same link , I get all the meta data extracted and shown. Is there a known problem with the Android share utility or am I not getting something right ?
(3) if I use sharingIntent.setType(“text/html”), then only Gmail, Bluetooh, Docs show up in the sharing list omitting others(facebook, google+ etc). Why is this so ?
Thanks for the help.
Sending HTML in the EXTRA_TEXT field is not the way you should do it. Just add the plain link without HTML-Information to the EXTRA_TEXT field.
The Google+ App doesn’t provide this functionality. You can use the web api for this issue.