Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

share using intent to facebook in android

I use the following code to share content

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "The status update text");
startActivity(Intent.createChooser(intent, "Dialog title text"));

It is OK for email, sms and whatever except Facebook. I google the reason and it seems that it is a bug of facebook since April but unfortunately no one fixes it.

However, I find that many app can still use intent chooser to invoke Facebook successfully such as Google reader. How can they do it?

As I know, we can use Facebook API, but how they can know user choose facebook in the chooser and invoke the facebook API?

like image 748
Bear Avatar asked Dec 28 '11 02:12

Bear


People also ask

What is Share Intent Android?

Android uses Intents and their associated extras to allow users to share information quickly and easily, using their favorite apps. Android provides two ways for users to share data between apps: The Android Sharesheet is primarily designed for sending content outside your app and/or directly to another user.

How do I share a Facebook post on Android?

To share a post you see on your Feed: Below a post, tap Share in the bottom right. To share to a friend's timeline, tap Feed below your name, then select On a friend's timeline. Type your friend's name, then tap Share Now.

What can Intent be used for in Android?

An intent allows you to start an activity in another app by describing a simple action you'd like to perform (such as "view a map" or "take a picture") in an Intent object.

How do I create a share link on Facebook?

To generate a Facebook Share Button, visit https://developers.facebook.com/docs/plugins/share-button and specify the URL you want people to share as well as the width. Then generate the code, and paste it into your site where you want the button to appear.


1 Answers

According to the latest updating to the bug tracker this is 'By Design' and the bug has been closed. https://developers.facebook.com/bugs/332619626816423/

So looks like this isn't going to be possible via intents..

like image 52
crazyfool Avatar answered Oct 04 '22 01:10

crazyfool