Google+ share link
-
27-10-2019 - |
سؤال
I'm looking for equivalent of facebook sharer link (http://www.facebook.com/sharer/sharer.php?u=http://stackoverflow.com
) in Google+. I can't use the regular +1 button as I need to embed it in Android application, but I want it to work similar - launch a website to +1 specified url. How do I do it? Or maybe there's some other supported way to embed +1 button in Android application?
Thanks
المحلول
The official Google+ Share Link is now available here: https://developers.google.com/+/plugins/share/#sharelink
Example usage:
نصائح أخرى
you can use following URL to get the Google+ share link.
https://plusone.google.com/_/+1/confirm?hl=en&url=YOUR-WEBSITE
Concerning that simple-static-link-approach: this (German) forum entry states that such a link does not exist. I don't know how reliable this is (as it seems to be a user-to-user forum), but it's still more than I've been able to find on the official pages.
Here is a google+ api: https://developers.google.com/+/api/ , you can integrate it inside your application.
Google+ library download: http://code.google.com/p/google-api-java-client/wiki/Android
Intent shareIntent = new PlusShare.Builder(Proyecto.this)
.setType("text/plain")
.setText(shareUsuario +" - "+ shareProyecto)
.setContentUrl(Uri.parse(getResources().getString(R.string.urlMeetinarts) + "work/" + shareId))
.getIntent();
startActivityForResult(shareIntent, 0);