-4
public void shareMessage(){    
    final Intent intent = new Intent(Intent.ACTION_SEND);     
    intent.setType("text/plain");   
    intent.putExtra(Intent.EXTRA_TEXT, text);    
    getContext().startActivity(Intent.createChooser(intent, "Share"));    

}

When I use "text/plain", Facebook comes up as an option but the text does not load up when selecting it. But the text does load for Twitter,email, SMS.

Has anyone else encountered this problem?

  • 1
    "Has anyone else encountered this problem" is not the kind of question to ask on this site. State a specific problem you're having that may or may not have a specific solution and someone will likely help you. As stated, it is unclear what kind of help you expect. – Jon Surrell Feb 17 '15 at 09:17
  • you cannot do that. you must using facebook sdk – Randyka Yudhistira Feb 17 '15 at 09:17

1 Answers1

0

As mentioned in the comments , Facebook has disabled the share intent a few years back Android and Facebook share intent , it doesn't handle EXTRA_SUBJECT or EXTRA_TEXT fields,

Use the Facebook api , Instructions found here --> https://developers.facebook.com/docs/android/share#share_options

Community
  • 1
  • 1
Akil
  • 719
  • 13
  • 23