Android : send an image as message with twitter in android

on Tuesday, September 16, 2014


i want to send an image with text to a follower using twitter4j, now i' m able to send a direct message like this:



twitter.sendDirectMessage(twitterID, message);


now, i can't figure out to send an image as direct message, i did this without any success:



StatusUpdate status = new StatusUpdate(message);
status.setMedia(pathOfTheFileToSend);
twitter.updateStatus(status);


One more thing, when i send a direct message i have to put the twitter ID for the follower, why is not the same when sending images?


thanks in advance.


0 comments:

Post a Comment