google-api-java-client

User Sign-out: clearing the default Google account does not cause the account picker to show up in Android app

戏子无情 提交于 2020-02-02 10:32:25
问题 I followed the below link to implement a "sign out" button in my android app, which uses a Google API client. However, upon connecting the google api again, the user is not presented with an account picker. It looks like the value of her/his original choice is somehow still cached perhaps. I've been trying to figure this out for a few hours. Any and all ideas very welcome. Thank you. https://developers.google.com/+/mobile/android/sign-in if (mGoogleApiClient.isConnected()) { Plus.AccountApi

Google Interactive post Button shows blank white screen on Click

自闭症网瘾萝莉.ら 提交于 2020-01-25 10:45:05
问题 After I included this iframe[src^="https://apis.google.com"] { display: none; } to suppress Google+ Sign-in Welcome Back Message, my Google+ Interactive post share button stopped showing when I click on the share button rather it just shows a faded white screen but when I remove or change the iframe display to visible , the interactive post button starts working. Please does anybody know what I can do to make the interactive post start working while still leaving the iframe attribute to

Gmail API Users.Messages.get throws User Rate Limit Exceeded

安稳与你 提交于 2020-01-25 03:49:09
问题 Trying to get message from the Gmail using RESTFul API and I'm getting this error : User Rate Limit Exceeded While, I'm implemented throttling (no more 5 gets in 1 sec, when google says that no more 25 calls in 1 sec) and also exponential backoff when I'm getting any exception and even with all this I'm still getting this exception. So, what could be the issue here ? Thanks 回答1: There is a well defined quota for Google APIs, here is the one for Gmail: https://developers.google.com/gmail/api

How to get more than 100 results from Google Custom Search API

寵の児 提交于 2020-01-22 23:06:10
问题 I am trying to use Google Custom Search API for research purposes in Java. As a result I'm gonna need a big result set for each query. However it seems that I'm limited with first 100 results which is much less than what I need. I use the list method like this: list.setStart(90L); And when I set it to start from index 100 I get this error: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request { "code" : 400, "errors" : [ { "domain" : "global", "message" : "Invalid

How to get more than 100 results from Google Custom Search API

江枫思渺然 提交于 2020-01-22 23:05:31
问题 I am trying to use Google Custom Search API for research purposes in Java. As a result I'm gonna need a big result set for each query. However it seems that I'm limited with first 100 results which is much less than what I need. I use the list method like this: list.setStart(90L); And when I set it to start from index 100 I get this error: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request { "code" : 400, "errors" : [ { "domain" : "global", "message" : "Invalid

I am getting an Error in listing the google drive files using Java: 401 Unauthorised error

元气小坏坏 提交于 2020-01-16 05:06:31
问题 I am trying to list the files in my Google Drive account using a Java application. I followed the Java QuickStart tutorial in the Google developers page, and i have my client secret file and here is my code: Drive service = DriveQuickstart.getDriveService(); FileList result = service.files().list() .setPageSize(10) .setFields("nextPageToken, files(id, name)") .execute(); List<File> files = result.getFiles(); if (files == null || files.size() == 0) { System.out.println("No files found."); }

Error in uploading post via Blogger API v1

跟風遠走 提交于 2020-01-15 18:51:12
问题 I'm trying to upload a post to my Blogger blog, yet I'm having an error. I'm using Eclipse and the libraries referesed are: google-oauth-java-client-1.17.0-rc and gdata-src.java-1.47.1. Code: import com.google.gdata.client.GoogleService; import com.google.gdata.data.Entry; import com.google.gdata.data.PlainTextConstruct; import com.google.gdata.util.ServiceException; import java.io.IOException; import java.net.URL; public class Blogger { public static void createPost(GoogleService myService)

Error in uploading post via Blogger API v1

≡放荡痞女 提交于 2020-01-15 18:50:48
问题 I'm trying to upload a post to my Blogger blog, yet I'm having an error. I'm using Eclipse and the libraries referesed are: google-oauth-java-client-1.17.0-rc and gdata-src.java-1.47.1. Code: import com.google.gdata.client.GoogleService; import com.google.gdata.data.Entry; import com.google.gdata.data.PlainTextConstruct; import com.google.gdata.util.ServiceException; import java.io.IOException; import java.net.URL; public class Blogger { public static void createPost(GoogleService myService)

Getting user credentials using Google+ API

♀尐吖头ヾ 提交于 2020-01-14 14:28:06
问题 I am trying to include Google sign in in my android application using Google+ Api. I am able to take account details from the user but once signed in I am getting null when requesting for username using call: Plus.PeopleApi.getCurrentPerson(mGoogleApiClient).getDisplayName() And Logcat shows: BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/plus/v1/people/me Although I am able to get email of the user using: Plus.AccountApi.getAccountName(GoogleClient

2-legged OAuth with google-api-java-client

六月ゝ 毕业季﹏ 提交于 2020-01-14 11:59:12
问题 Does anyone know how to use 2-legged OAuth with google-api-java-client? I'm trying to access the Google Apps Provisioning API to get the list of users for a particular domain. The following does not work HttpTransport transport = GoogleTransport.create(); GoogleHeaders headers = (GoogleHeaders) transport.defaultHeaders; headers.setApplicationName(APPLICATION_NAME); headers.gdataVersion = GDATA_VERSION; OAuthHmacSigner signer = new OAuthHmacSigner(); signer.clientSharedSecret = CONSUMER_SECRET