Question

We are developing an android app that requires to have a like functionality which should be +1 in Google Plus. We tried with the Google developer site but it says of a url:

private static final int PLUS_ONE_REQUEST_CODE = 0;

protected void onResume() {
super.onResume();
// Refresh the state of the +1 button each time the activity receives focus.
mPlusOneButton.initialize(URL, PLUS_ONE_REQUEST_CODE);
}

The URL here refers to a link of a page or a web site or so. Now what we wish to have is to +1 a post. Is there any way we could do so?

Était-ce utile?

La solution

You cannot, at least as of this posting, Like or +1 a post using the API: Here is the documentation:

Google+ API Frequently Asked Questions

Autres conseils

what type of post you're referring here? if in case we take this question URL put this URL in mPlusOneButton.initialize(**URL HERE**, PLUS_ONE_REQUEST_CODE);

This may help you. Try this url.

private static final String URL = "https://play.google.com/store/apps/details?id=yourPackageName";

you should also see the link https://developers.google.com/+/mobile/android/app-activities

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