我需要从安卓应用程序在Google+共享链接。在文档中,我看到了以下代码:
Button shareButton = (Button) findViewById(R.id.share_button);
shareButton.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
// Launch the Google+ share dialog with attribution.
Intent shareIntent = ShareCompat.IntentBuilder.from(ExampleActivity.this)
.setType("text/plain")
.setText("Welcome to the Google+ platform. https://developers.google.com/+")
.getIntent()
.setPackage("com.google.android.apps.plus");
startActivity(shareIntent);
}
});但如果在我的手机上是官方客户端Google+,它就可以工作。我可以在没有使用官方客户端的情况下在Google+中共享链接。
发布于 2012-08-09 21:54:51
Google+接口不支持共享。链接:https://developers.google.com/apis-explorer/#s/plus/v1/
发布于 2012-08-11 07:04:27
共享意图,显示在您提供的代码中。使用本机Google+应用程序向Google+共享内容。这是在Android上分享内容到Google+的唯一途径。
https://stackoverflow.com/questions/11882775
复制相似问题