Android 谷歌加一键安卓不工作
嗨,伙计们,我已经在Android中集成了一个google+1按钮 主要区别在于我是在对话框中创建的,而不是在活动中创建的。下面是我使用的代码Android 谷歌加一键安卓不工作,android,google-plus,google-play-services,Android,Google Plus,Google Play Services,嗨,伙计们,我已经在Android中集成了一个google+1按钮 主要区别在于我是在对话框中创建的,而不是在活动中创建的。下面是我使用的代码 final Dialog dialog = new Dialog(this.getContext()); dialog.setContentView(R.layout.plus_one_layout); dialog.setTitle("Title..."); dialog.setCancelable(fa
final Dialog dialog = new Dialog(this.getContext());
dialog.setContentView(R.layout.plus_one_layout);
dialog.setTitle("Title...");
dialog.setCancelable(false);
plusOneButton = (PlusOneButton) dialog.findViewById(R.id.plus_one_button);
if(!DotsCrazy.this.mGoogleApiClient.isConnected()) {
DotsCrazy.this.mGoogleApiClient.connect();
}
OnPlusOneClickListener listener = new OnPlusOneClickListener() {
@Override
public void onPlusOneClick(Intent intent) {
if(!DotsCrazy.this.mGoogleApiClient.isConnected()) {
DotsCrazy.this.mGoogleApiClient.connect();
} else {
startActivityForResult(intent, 0);
}
}
};
plusOneButton.initialize("http://plus.google.com/+Example",listener);
dialog.show();
问题是它总是显示“您的+1出现临时问题,请稍后再试”。有人知道原因吗?日志猫上没有错误消息?@Wakim日志猫上没有消息!!是
http://plus.google.com/+示例
您实际使用的url?如果是这样的话,你需要使用一个在HTTP 200响应中解析的url。不,只有当我在某个地方做这件事时,而不是在某个活动中,我们才有问题。我也有同样的问题。。