0

您好,我想在 google plus 中与文本共享图像,但现在我找不到示例和详细信息来源,所以请帮助我...谢谢

File tmpFile = new File("/path/to/image");
final String photoUri = MediaStore.Images.Media.insertImage(
     getContentResolver(), tmpFile.getAbsolutePath(), null, null);

Intent shareIntent = ShareCompat.IntentBuilder.from(this)
     .setText("Hello from Google+!")
     .setType("image/jpeg")
     .setStream(Uri.parse(photoUri))
     .getIntent()
     .setPackage("com.google.android.apps.plus");

我有这个代码,但我不能使用,因为我想使用 sdk 分享图像+文本,如 facebook 和 twitter 等。

4

1 回答 1

0

我们在 Android 中为 Google+ 提供库,例如 facebook 和 twitter。链接中给出的详细信息https://developers.google.com/+/mobile/android/getting-started

另外,你可以通过这个有同样问题的链接。

于 2013-06-04T12:19:56.880 回答