Default image of App in Google Play is not shown while sharing using google PlusShare

356 views Asked by At

When users tap G+ in the android App, It should fetch the image as shown in the document for PLUS SHARE. But it is not showing any image of my App. enter image description here

enter image description here

Could you please let me know what fix is needed in my code

String value

<string name="plus_example_deep_link_id">
    https://play.google.com/store/apps/details?id=com.egg.catcher.fun</string>
<string name="plus_example_deep_link_url">
    https://play.google.com/store/apps/details?id=com.egg.catcher.fun
</string>

Code

    private Intent getInteractivePostIntent() {
    // Create an interactive post with the "VIEW_ITEM" label. This will
    // create an enhanced share dialog when the post is shared on Google+.
    // When the user clicks on the deep link, ParseDeepLinkActivity will
    // immediately parse the deep link, and route to the appropriate  
   resource.
    String action = "/?view=true";
/*
    Uri callToActionUrl = Uri.parse(getString(R.string.plus_example_deep_link_url) + action);
    String callToActionDeepLinkId = getString(R.string.plus_example_deep_link_id) + action;
*/

    Uri callToActionUrl = Uri.parse(getString(R.string.plus_example_deep_link_url));
    String callToActionDeepLinkId = getString(R.string.plus_example_deep_link_id);

    // Create an interactive post builder.
    PlusShare.Builder builder = new PlusShare.Builder(this);

    // Set call-to-action metadata.
    builder.addCallToAction(LABEL_VIEW_ITEM, callToActionUrl, callToActionDeepLinkId);

    // Set the target url (for desktop use).
    builder.setContentUrl(Uri.parse(getString(R.string.plus_example_deep_link_url)));

    // Set the target deep-link ID (for mobile use).
    builder.setContentDeepLinkId(getString(R.string.plus_example_deep_link_id),
            null, null, null);

    // Set the pre-filled message.
    builder.setText(mEditSendText.getText().toString());

    return builder.getIntent();
}
0

There are 0 answers