无法在Facebook上分享文字

时间:2015-09-24 13:14:19

标签: facebook facebook-android-sdk

我的Android应用中有一个EditText和一个提交按钮。当我在EditText中编写内容然后单击提交按钮时,它会打开Facebook对话框,但EditText中的文本不会显示在对话框中。

    String textToShare = txt.getText().toString();
    Intent sharingIntent = new Intent(Intent.ACTION_SEND);
    sharingIntent.setType("text/plain");
    sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, textToShare);
    startActivity(Intent.createChooser(sharingIntent,"Share using"));

0 个答案:

没有答案
相关问题