Android – Google plus shared URL cannot be rendered

I'm using plusshare. Builder to share the URL of Google plus, but it doesn't render

It's rendered successfully when I just copy and paste the URL in Google, but it doesn't work on Android

This is my URL

Plz guided me to use my code.. there is nothing missing in my code

private void shareToGooglePlus(String urlToShare){
        PlusShare.Builder builder = new PlusShare.Builder(getActivity());

        // Set call-to-action Metadata.
        builder.addCallToAction(
                "CREATE_ITEM", /** call-to-action button label */
                Uri.parse("http://plus.google.com/pages/create"), /** call-to-action url (for desktop use) */
                "/pages/create" /** call to action deep-link ID (for mobile use), 512 characters or fewer */);

        // Set the content url (for desktop use).
        builder.setContentUrl(Uri.parse("https://plus.google.com/share?url="+ urlToShare));
        // Set the share text.
        builder.addStream(Uri.parse(urlToShare));
        builder.setText(urlToShare);

        startActivityForResult(builder.getIntent(), 0);
    }

resolvent:

Have you ever tried

Intent shareIntent = new PlusShare.Builder(this)
        .setText("CREATE_ITEM")
        .setType("text/plain")
        .setContentUrl(Uri.parse("https://plus.google.com/share?url="+ urlToShare)
        .setContentDeepLinkId(Uri.parse("/pages/create"))
        .getIntent();

startActivityForResult(shareIntent, 0);

Invalid Sign

Invalid Sign

I hope I can help you

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>