문제

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

도움이 되었습니까?

해결책

다른 팁

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);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top