0

I'm working on an android app. It's about text convert. I added share button. It's working except facebook. When I click to share button and select facebook, the converted text doesn't seem in facebook share section. Here it's the share button code:

btn_share.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
                    Intent share = new Intent(Intent.ACTION_SEND);
                    share.setType("text/plain");
                    share.putExtra(Intent.EXTRA_TEXT, text_converted);
                    share.putExtra(Intent.EXTRA_TITLE, "Cool Text Share");
                    startActivity(Intent.createChooser(share, "Cool Text Share"));
  • Facebook does not allow you to pre-set the text on shares, it's against policy. So any text you set will be ignored. – Ming Li Nov 04 '13 at 18:59
  • but most of the games and apps can share text. how can they do that? – Rafet Güven Nov 07 '13 at 16:29
  • For that, you have to request publish permissions from the user directly, and POST to me/feed using Graph API. Even then, you need to ask the user to type in the share text, otherwise it's still against policy and can get your app banned. – Ming Li Nov 07 '13 at 18:18
  • thanks a lot. everything solved in my mind ;) – Rafet Güven Nov 07 '13 at 21:32

1 Answers1

0
share.putExtra(Intent.EXTRA_TEXT, text_converted);

this code is waiting for URL

you may check this answer will help you alot : https://stackoverflow.com/a/4967008/1460591

Community
  • 1
  • 1
Youans
  • 4,801
  • 1
  • 31
  • 57