Thursday, January 23, 2014

Microblogging android SDK, how to get the microblogging message?


            
StatusAPI There is a method publicTimeline, comment is "Return latest public microblogging" in the API documentation, this function should return JSON format, the name is Statuses, but in the Android api, this function is the Void, that I Returns should be how to get this result?
Please large cattle pointers
Reply:
Get the Timeline method has one parameter is RequestListener data in this listener's OnComplite where you can get
Reply:
In fact, this argument is a callback object after the request corresponds to a different state to call different methods
Reply:
cited landlord blueskyfly119 reply:
StatusAPI There is a method publicTimeline, notes a "return to the latest public microblogging" in the API documentation, this function should return JSON format, the name is Statuses, but in the Android api, this function is Void, then how should I get this return result?
Please large cattle pointing


Microblogging Status information should be the object, the function can return this object?
listener wording is not very familiar with, requestLister is the interface, there onComplete () method, you need to write here to get Status object's methods, but where do get this object
Reply:
cited landlord blueskyfly119 reply:
StatusAPI There is a method publicTimeline, notes a "return to the latest public microblogging" in the API documentation, this function should return JSON format, the name is Statuses, but in the Android api, this function is Void, then how should I get this return result?
Please large cattle pointing


I see the previous example, where the sdk is weibo4j is Weibo.getFriendsTimeline (p); But now the android sdk in how to achieve it?
Reply:


onComplete method has a String parameter This parameter is to get to the JSON string

 public void onComplete (String response) {
try {
JSONObject timeline = new JSONObject (json);
timeline.getString ("You want something key")
/ / Handle the things you want
} Catch (JSONExceptione) {
e.printStackTrace ();
}
}

What KEY corresponds to what see
http://open.weibo.com/wiki/2/statuses/public_timeline


Note: onComplete where things are running in a new thread if you want to change the UI, then we must be sent to the handler in onComplete message


Reply:
references, 4th Floor blueskyfly119 reply:
cited landlord blueskyfly119 reply: StatusAPI There is a method publicTimeline, notes a "return to the latest public microblogging" In the API documentation, this function should return JSON format, the name is Statuses, but in the Android api, this function is Void, then how should I get this return result?
Please large cattle pointing

I see the previous example, where the sdk is weibo4j is Weibo.g ......
weibo4j is not the Android SDK for JAVA eh ...
Reply:
references, 5th Floor CuGBabyBeaR reply:
onComplete method has a String parameter This parameter is to get to the JSON string

? Java code 123456789public void onComplete (String response) {try {JSONObject timeline = new JSONObject (json); timeline.getString ("You want something ......


This code is to write your own, or in a bag?
Is there a simple example, I learn a little bit slowly write too strenuous
there seems to be only one authorized demo example
Reply:
reference to the 7th floor blueskyfly119 reply:
references, 5th Floor CuGBabyBeaR reply: onComplete method has a String parameter This parameter is to get to the JSON string < br />
Java code? 123456789public void onComplete (String response) {try {JSONObject timeline = new JSONObject (json ......
write your own
Reply:
reference to the 8th floor CuGBabyBeaR reply:
reference to the 7th floor blueskyfly119 reply: Quote, 5th Floor CuGBabyBeaR reply: onComplete method has a String parameter This parameter is Get to JSON string

Java code? 123456789public void onComplete (String response) {try {JSONObject timel ......

Well, thank
Reply:
Why is my phone just to get the two pieces of information, but there are 20 official test, why you

No comments:

Post a Comment