Question

I'm trying to implement the Google plusOne button in an app. I've followed the setup processes and the button works nicely both in the PlusSampleActivity Project and in my app when using the default test url

However when I use replace this with my app market url then the button is greyed and just spins when clicked.

I'm using the market url in the format "market://details?id=package_name" [as per the Android recommendations]

any hints would be most welcome!

my play-service details:

  • Google-play-services SDK - rev16

  • Google-play-services_library project [android:versionCode="4323030" android:versionName="4.3.23 (1069729-030)]

  • OAuth 2 setup

[edit] interestingly if I use the http equivalent url - which is supposed to be used in webites

e.g. "http://play.google.com/store/apps/details?id=package name"

then the google plusone button works fine! [/edit]

Était-ce utile?

La solution

I believe the recommendations you mentioned don't specifically pertain to the +1 facility. The "market" alternative which is working is:

https://market.android.com/details?id=PACKAGE_NAME

Nevertheless, I believe you're supposed to use:

https://play.google.com/store/apps/details?id=PACKAGE_NAME

Personally, I switched to the "market" link, because I had a strange "out-of-sync" problem. The number of +1's on Play's website was very different than those inside the app. It looks like the issue has been fixed though and now both links are in sync.

You can test your links here: https://developers.google.com/+/web/+1button/

Autres conseils

Ioh-maa, You are the man!! that did the trick, after hours, days even, of struggling with this :-)

I'm sorry I can't yet vote up your outstanding answer, but will do when I can.

I used the https://market url format that you suggested and it lept to life.

I have to say that the android developers page really read to me as if you should not have the https:// prefix, when using in an Android app. but there you go...

In my case:

mPlusOneStandardButtonWithAnnotation.initialize("https://play.google.com/store/apps/details?id=com.appxy.calenmob", 0);

if I do like above,I find +79 on google play but +56 on my app!

then I change like this:

mPlusOneStandardButtonWithAnnotation.initialize("https://market.android.com/details?id=com.appxy.calenmob", 0);

it worked! I find the + numbers is same my app between google play. Good luck

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top