Google+ and Android Studio edit share publication

3

I am developing an application that has the share action in Google+. When one shares, the publication that I am going to leave next in the image comes out. The question is: How can I modify the photo that is marked in brown? How can I modify the text of the photo that appears in red?

I want the 2 things to be dynamic. For example: If I share something related to a place that sells pizzas, that in the photo of the publication I get the photo of that place that sells pizzas and in turn that I get a descriptive text of that place in the part that is highlighted in red.

This is my code that I have to edit the publication that is shared on Google +

           Intent shareIntent = new PlusShare.Builder(getApplication())
                                    .setType("text/plain")
                                    .setText("este es el titulo de la publicacion en G+")
                                    .setContentUrl(Uri.parse("https://developers.google.com/+/"))
                                    .getIntent();
                            startActivityForResult(shareIntent, 0);

Thank you very much, I hope to be clear with the questions.

    
asked by Nicolas Schmidt 12.06.2016 в 03:54
source

1 answer

1

Without looking at the code, it's hard for me to help you specifically but from Android using the google plus API you can use setContentDeepLinkId (check it in link )

Specifically:

setContentDeepLinkId(String deepLinkId, String title, String description, Uri thumbnailUri)

EDIT with code contributed by OP:

Intent shareIntent = new PlusShare.Builder(getApplication())
    .setType("text/plain")
    .setText("este es el titulo de la publicacion en G+")
    .setContentUrl(Uri.parse("https://developers.google.com/+/")
    .setContentDeepLinkId("link",
        "titulo", 
        "descripcion", 
        Uri.parse(imagen)))
    .getIntent();
startActivityForResult(shareIntent, 0);
    
answered by 15.06.2016 в 13:25