有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java facebook sdk 3.0照片标签值和键

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

标签的格式是什么


共 (1) 个答案