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

标签的格式是什么?

4

1 回答 1

0

请参阅此处的照片 API 参考:https ://developers.facebook.com/docs/reference/api/photo/#tags

于 2013-02-04T17:36:02.657 回答