글쎄, 나는 많은 검색을하지만 여전히 원하는 대답을 얻지 못한다.
마지막으로 나는 사용자 정의 메시지로 트위터에 사진을 업로드하려면이 옵션을 사용하십시오 트위터 데모의 검색에 여전히
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();
}
}
는 트위터의 OAuth와 twitPic를 사용하지 않고 사용자 정의 메시지와 함께 트위터에 사진을 트윗 할 수 있습니다.
즐기십시오. :)
감사합니다.
나는 똑같은 것을 사용했다. 그러나 그것이 올바른 메시지 일지라도 INVALID USERNAME & PASSWARD라고 표시한다. –
@Amandeepsingh : 글쎄 그것은 내 경우에는 작동하지만 대답을 업데이트하자. . . –
@Amandeepsingh : 업데이트 된 답변을 확인하십시오. 모든 경우에 적용됩니다. –