我可以发布报价但我无法在相机应用中发布照片。
也许有尺寸限制?
这是我的代码我正在使用异步
public class TumblrPostPhotoAsyncTask extends
AsyncTask<String, String, String> {
// params[0] = blog name
// params[1] = quote
// params[2] = consume key
// params[3] = consume secret
@Override
protected String doInBackground(String... params) {
try {
JumblrClient client = TumblrLoginActivity.getClient(params[2],
params[3]);
//PhotoPost post = client.newPost(params[0], PhotoPost.class);
//Photo photo = new Photo(params[1]);
//post.setPhoto(photo);
// post.setSource(params[1]);
//post.setSource("https://www.google.com/images/srpr/logo11w.png");
//post.save();
PhotoPost post = client.newPost(params[0], PhotoPost.class);
Photo photo = new Photo(params[1]);
post.setPhoto(photo);
post.setData(new File(params[1]));
post.setSource(params[1]);
post.save();
} catch (Exception e) {
return "Tumblr's login have timed out, please login in to tumblr again. Sorry.";
}
return "tumblr photo post successful";
}
我也在使用Otto。
但是,真的无法弄明白这一点。
谢谢!