Bundle params = new Bundle();
String tags = "";
StringBuilder sb = new StringBuilder();
for (int i = 0; i < ischecked.length; i++) {
if (i == 0) {
sb.append("[");
}
if (ischecked[i]) {
sb.append("{\"tag_uid\":" + FBFriendlist.get(i).getFBFriendid() + "},");
}
if (i == ischecked.length - 1) {
sb.replace(sb.length() - 1, sb.length(), "]");
tags = sb.toString();
}
}
params.putString("tags", tags);
Request requestphoto = new Request(Session.getActiveSession(),"me/photos", params,
HttpMethod.POST, new Request.Callback() {
@Override
public void onCompleted(Response response) {
Log.e("id", response.getGraphObject().getProperty("id").toString());
Intent intent = new Intent(PaintQuitGameScene.this, UserProfileScene.class);
startActivity(intent);
finish();
}
});
requestphoto.executeAsync();
执行时返回nullpointerexception
。
标签的格式是什么?