在没有解决方案的情况下敲击键盘几天。
Plus.PlusOptions plusOptions = new Plus.PlusOptions.Builder()
.addActivityTypes("http://schemas.google.com/AddActivity")
.build();
mGoogleClient = new GoogleApiClient.Builder(mContext, this, this)
.addApi(Games.API)
.addScope(Games.SCOPE_GAMES)
.addApi(Plus.API,plusOptions)
.addScope(Plus.SCOPE_PLUS_LOGIN)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.setGravityForPopups(Gravity.TOP | Gravity.CENTER_HORIZONTAL)
.build();
...
if (mGoogleClient.isConnected()) {
ItemScope itemScope = new ItemScope.Builder()
.setType("http://schema.org/Thing")
.setUrl(mContext.getResources().getString(R.string.web_url))
.build();
Moment moment = new Moment.Builder()
.setType("http://schema.org/AddAction")
.setTarget(itemScope)
.build();
Plus.MomentsApi.write(mGoogleClient, moment).setResultCallback(new ResultCallback<Status>() {
@Override
public void onResult(Status status) {
Log.d("Settings", status.toString());
}
});
D /设置:状态{statusCode = INTERNAL_ERROR,resolution = null}
我已经检查了开发者控制台的完整性,我确实启用了google + api。
相同代码中的成就,高分和互动帖子都有效。它只是拒绝。