我使用的是action_send的Facebook分享在这里插入图像,但不添加文本是什么原因



Facebook共享代码:

String text = "Offer Ends:" + offerending + "n Offer Type:"
                    + offertype + "n Address:" + offaddress + "n"
                    + webbsuitee;
            String completePath = Environment.getExternalStorageDirectory()
                    + "/" + "temporary_file.jpg";
            File file = new File(completePath);
//              Uri imageUri = Uri.fromFile(file);
            Uri imageUri = Uri.fromFile(file);
             Intent shareIntent = new Intent();
             shareIntent.setAction(Intent.ACTION_SEND);
             shareIntent.setType("image/*");
             shareIntent.putExtra(Intent.EXTRA_TEXT, "Hello");
             shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
             shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
             startActivity(Intent.createChooser(shareIntent, "send"));

被Facebook API关闭。你需要使用Facebook的Android SDK才能做到这一点!检查一下:https://developers.facebook.com/bugs/332619626816423

最新更新