I'm adding the ability to share scores from my app using android's share intent:
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "My Score");
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "I scored "+score+" on "+difficultyString+" difficulty.");
context.startActivity(Intent.createChooser(shareIntent, "Share your score"));
When I choose Facebook from the chooser, it goes to m.facebook.com and says "Your link could not be shared". What's going wrong here?
This is a common problem found in all android apps when trying to share to facebook. Facebook blocks other applications from sharing using their app. I'm not sure why, but many companies are trying to bypass this. Currently, it is "unfix-able". Sorry.
Dude, you can try this:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, the_pure_link);
startActivity(Intent.createChooser(intent, "Share with"));
If there is images inside the_pure_link, or the_pure_link contains:
<link rel="image_src" type="image/jpeg" href="image_address" />
The facebook share will show the link, with the image, and your comment together. All these solutions are find from stackoverflow.com. Check it here:
Share Text on Facebook from Android App via ACTION_SEND
Image share from android to facebook
I found out that you can use this URL to share something to facebook:
http://www.facebook.com/sharer.php?s=100&p[title]=YOUR_TITLE_HERE&p[summary]=YOUR_SUMMARY_HERE&p[url]=YOUR_URL_TO_POINT_TO_WHEN_THIS_IS_BEEING_CLICKED
This does not require the user to have facebook installed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With