我正在开发一个在ios 5.1中运行的ipad应用程序,其中已完成twitter集成。 现在,我可以使用twitter.framework使用我的应用程序发推文。 但我想了解我们制作的推文的详细信息。 我在框架中使用TWRequest发布查询
-(IBAction)queryButtonTapped:(id)sender{ TWRequest *request = [[TWRequest alloc] initWithURL:[NSURL URLWithString:@"http://search.twitter.com/search.json?q=indians&rpp=5&with_twitter_user_id=true&result_type=recent"] parameters:nil requestMethod:TWRequestMethodGET]; [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) { if([urlResponse statusCode] >= 200){ NSError *error; NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&error]; UIAlertView *alertView1 = [[UIAlertView alloc] initWithTitle:@"Twitter response" message:[NSString stringWithFormat:@"response: %@",dict] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView1 show]; } else{ UIAlertView *alertView2 = [[UIAlertView alloc] initWithTitle:@"oops" message:[NSString stringWithFormat:@"response: %i, and error is %@",[urlResponse statusCode],error] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView2 show]; } }]; }在这里,我正在搜索我做的印地安推文。
我收到一条消息,提示“Twitter REST API v1不再处于活动状态.PLease迁移到API v1.1。” 现在我想知道那个1.1版本是什么。 它是否与Twitter.framework有关,或者我应该获得新的twitter.framwork。 否则我需要以不同的方式查询。
I am developing an ipad application running in ios 5.1 in which twitter integration has been done. Now i could able to tweet using my application using the twitter.framework. But i want to get the details of the tweet that we made. I used TWRequest in the framework to post a query as
-(IBAction)queryButtonTapped:(id)sender{ TWRequest *request = [[TWRequest alloc] initWithURL:[NSURL URLWithString:@"http://search.twitter.com/search.json?q=indians&rpp=5&with_twitter_user_id=true&result_type=recent"] parameters:nil requestMethod:TWRequestMethodGET]; [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) { if([urlResponse statusCode] >= 200){ NSError *error; NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&error]; UIAlertView *alertView1 = [[UIAlertView alloc] initWithTitle:@"Twitter response" message:[NSString stringWithFormat:@"response: %@",dict] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView1 show]; } else{ UIAlertView *alertView2 = [[UIAlertView alloc] initWithTitle:@"oops" message:[NSString stringWithFormat:@"response: %i, and error is %@",[urlResponse statusCode],error] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView2 show]; } }]; }Here i am searching indians tweet that i made.
I got an alert with message as "The Twitter REST API v1 is no longer active.PLease migrate to API v1.1." Now i want to know what is that 1.1 version. Does it have something to do with Twitter.framework or should i get new twitter.framwork. Or else i need to query in different manner.
最满意答案
我一个月来一直有同样的问题,看看这是否有帮助。 twitter框架使用api 1.0版本,现在已经取消了。
I have been having the same issue for a month now, see if this helps. The twitter framework uses api version 1.0 and its has been take down now.
更多推荐
发布评论