简体   繁体   English

如何在+1中使用Android应用对+1中的信息进行+1?

[英]How to +1 a post in google plus using android app?

We are developing an android app that requires to have a like functionality which should be +1 in Google Plus. 我们正在开发一个Android应用,该应用需要具有类似的功能,并且应该在Google Plus中为+1。 We tried with the Google developer site but it says of a url: 我们尝试了Google开发人员网站,但其中提到了网址:

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. 这里的URL是指页面或网站等的链接。 Now what we wish to have is to +1 a post. 现在,我们希望对+1信息发表评论。 Is there any way we could do so? 有什么办法可以做到吗?

You cannot, at least as of this posting, Like or +1 a post using the API: Here is the documentation: 您至少不能在使用此API的情况下使用该API赞或+1帖子:以下是文档:

Google+ API Frequently Asked Questions Google+ API常见问题

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); 如果以防万一,我们将这个问题的URL放在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 您还应该看到链接https://developers.google.com/+/mobile/android/app-activities

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM