在我的应用程序中,我使用 tweetPic 上传图像,但图像只能在 tweetPic 上看到。而不是我想在推特上上传图片以及自定义消息。那么怎么可能呢?为此,还需要 Twitter OAuth。
我想要任何类似的演示或示例示例应用程序。
谢谢。
在我的应用程序中,我使用 tweetPic 上传图像,但图像只能在 tweetPic 上看到。而不是我想在推特上上传图片以及自定义消息。那么怎么可能呢?为此,还需要 Twitter OAuth。
我想要任何类似的演示或示例示例应用程序。
谢谢。
好吧,我搜索了很多,但仍然没有得到我想要的答案。
最后,我使用它在 Twitter 上上传带有自定义消息的照片:
File picture = new File(APP_FILE_PATH + "/"+filename+".jpg");
// Create TwitPic object and allocate TwitPicResponse object
TwitPic tpRequest = new TwitPic(TWITTER_NAME, TWITTER_PASSWORD);
TwitPicResponse tpResponse = null;
// Make request and handle exceptions
try {
tpResponse = tpRequest.uploadAndPost(picture, customMessageEditText.getText()+" http://www.MySite.com/");
}
catch (IOException e) {
e.printStackTrace();
}
catch (TwitPicException e) {
e.printStackTrace();
}
// If we got a response back, print out response variables
if(tpResponse != null) {
tpResponse.dumpVars();
System.out.println(tpResponse.getStatus());
if(tpResponse.getStatus().equals("ok")){
Toast.makeText(getApplicationContext(), "Photo posted on Twitter.",Toast.LENGTH_SHORT).show();
}
}
仍在寻找 Twitter Demo 以使用 twitter OAuth 和不使用 twitPic 在 Twitter 上使用自定义消息发布图片。
享受。:)
谢谢。