I'm programmatically reading user's private post from Google+ Domains API using the Java class com.google.api.services.plusDomains.PlusDomains.Activities.List
as documented here, and I'm using the domain authorized service account and PCKS12 file so I'm pretty sure that I have proper credential configured for the API call.
For most of accounts, when I call PlusDomains.Activities.List, I do receive a json object containing a list of domain private posts of the given user, represented by class com.google.api.services.plusDomains.model.Activity
. However, for a specific user, the same call doesn't return any activity, even there're activities to be returned.
We contacted the Google support team and they said it might be a client library problem and asked us to open an issue here. I'd be really glad if anyone could help us on this.
Here is my code snippet:
PlusDomains plusDomains = new PlusDomains.Builder(httpTransport, jsonFactory, credential).setApplicationName(appName).setRootUrl("https://www.googleapis.com/").setHttpRequestInitializer(credential).build();
PlusDomains.Activities.List listActivities = plusDomains.activities().list("me", "user");
listActivities.setMaxResults(50l);
com.google.api.services.plusDomains.model.ActivityFeed activityFeed = listActivities.execute();
List<com.google.api.services.plusDomains.model.Activity> activities = activityFeed.getItems();
The client library version in my POM.xml is:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-plusDomains</artifactId>
<version>v1-rev291-1.22.0</version>
</dependency>