1

以下是我使用 Google+ 应用的 ShareActivity 进行分享的方式。我想知道我是否可以避免这一额外步骤并直接从我的应用程序的 UI 中发布?谢谢。

Intent shareIntent = new PlusShare.Builder(this).setType("image/jpeg")
                    .setText(status.getText().toString())
                    .setContentUrl(Uri.parse("https://developers.google.com/+/"))
                    .setStream(Uri.fromFile(image))
                    .getIntent()
                    .setPackage("com.google.android.apps.plus");

            startActivityForResult(shareIntent, 0);
4

1 回答 1

2

没有可用于直接发布到 Google+ 的 API - ShareActivity 是首选选项,因为它使用户能够选择他们想要与哪些圈子分享。

您可以使用应用活动将用户操作直接写入 Google+:https ://developers.google.com/+/mobile/android/app-activities - 但是这些不会直接显示在用户流中。

于 2013-08-19T14:16:41.757 回答