android - Need to retrieve the TweetId for a tweet posted so that i can refer it later -
i using fabric io publishing tweets in android app. tweets being published want retrieve tweetid can refer these tweets later.
statusesservice.update(tweetrequestobject.getstring("comment"), null, null, null, null, null, null, null, new callback<tweet>() { @override public void success(result<tweet> tweetresult) { try { inputstream inputstream = tweetresult.response.getbody().in(); bytearrayoutputstream baos = new bytearrayoutputstream(); byte[] buffer = new byte[1024]; int length = 0; while ((length = inputstream.read(buffer)) != -1) { baos.write(buffer, 0, length); } string data = new string(baos.tobytearray(), "utf-8"); log.d(chillumconstants.chillum_const, "twitter response :: " + data); } catch (ioexception e) { e.printstacktrace(); } //jsonobject tweetresponseobject = new jsonobject(tweetresult.response); toast toast = toast.maketext(context, "tweet successful", toast.length_long); toast.show(); } @override public void failure(twitterexception e) { toast toast = toast.maketext(context, e.getmessage(), toast.length_long); toast.show(); } });
i not sure how or if can retrieve details tweetresult object.
found answer there posting in case else runs same issue
long id = tweetresult.data.getid(); string idstr = tweetresult.data.idstr; log.d(chillumconstants.chillum_const,"tweet id : "+id); log.d(chillumconstants.chillum_const,"tweet id str : "+idstr);
Comments
Post a Comment