Mako
Mako

Reputation: 1515

Unable To Share Content on Facebook through Android Application

I am trying to post some content to Facebook wall through my Android application. I am using the following Intent code for sharing

Intent msg = new Intent(Intent.ACTION_SEND);
msg.setType("text/plain");
msg.putExtra(Intent.EXTRA_TEXT, display_quote.getText().toString() );
startActivity(Intent.createChooser(msg, "Share Quote"));

However when i select 'Facebook' from the options which i get , i am redirected to a URL http://m.facebook.com/sharer.php and i get an error saying that "Your Link could not be shared" .

Is there any other way of posting to Facebook wall through Android application?

Upvotes: 5

Views: 2314

Answers (2)

Simon
Simon

Reputation: 140

There is a not well known bugs in the Facebook intent parser. Some of them are solved but not completely-with new bugs. Thus, msg.putExtra(Intent.EXTRA_TEXT,"http://Iam_a_good_boy.com/no_doubts.asp"); requires a URL(link). It is the cause of the message, which you have seen on the target Facebook page.

Upvotes: 0

Cristian
Cristian

Reputation: 200090

Is there any other way of posting to Facebook wall through Android application ?

Yes, and it's the way you must do it: use the Facebook SDK for android:

https://github.com/facebook/facebook-android-sdk/

You can download it from the link above among with some examples.

Upvotes: 3

Related Questions