import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.qq.open.common.json.JSONException;
import com.qq.open.qzone.bean.param.QqUpdatePicParamBean;
import com.qq.open.qzone.bean.result.QqUpdatePicResultBean;
import com.qq.open.qzone.photo.QqUpdatePic;
public class TestUpdatePic {
/**
* @param args
* @throws IOException
* @throws JSONException
*/
public static void main(String[] args) throws IOException, JSONException {
File file = new File("D:/Users/Pictures/80后/");
File[] files = file.listFiles();
List<QqUpdatePicParamBean> paramBeanList = new ArrayList<QqUpdatePicParamBean>();
for (File file2 : files) {
QqUpdatePicParamBean paramBean = new QqUpdatePicParamBean();
paramBean.setAccessToken("138F0112CC9B350B8AE00899CB47D489");
paramBean.setOpenId("2D78AAACEAF41021180BEAA2A47871B8");
paramBean.setAlbumId("V11S8neA1OXXHF");
paramBean.setTitle(file2.getName());
paramBean.setPicPath("D:/Users/Pictures/80后/" + file2.getName());
paramBeanList.add(paramBean);
}
QqUpdatePic qup = new QqUpdatePic();
List<QqUpdatePicResultBean> resultBeanList = qup.updateMorePic(paramBeanList);
for (QqUpdatePicResultBean qqUpdatePicResultBean : resultBeanList) {
System.out.println(qqUpdatePicResultBean.getLargeUrl());
}
}
}