简体   繁体   中英

Android Share text not showing up in Facebook

I have a share button, which when clicked I want to open a share windows, so the user can share this text in social networks. The problem is facebook, it is not accepting the EXTRA_TEXT passed onto the intent

Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
                sharingIntent.setType("text/plain");
                String shareBody = "Here is the share content body";
                sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject Here");
                sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
                startActivity(Intent.createChooser(sharingIntent, "Share via"));

every other share option (twitter, tumblr...) works fine, just facebook is giving problems... How can I solve this without having to create a whole new class with facebook sdk just for this purpose??

The Facebook application does not handle either the EXTRA_SUBJECT or EXTRA_TEXT fields.

Here is bug link : https://developers.facebook.com/bugs/332619626816423

You cant Share Text in Facebook as Facebook discards it and asks you in its application to write the text like what in your mind.

see this report

Android and Facebook share intent

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM