twitterapi。如何获得经过身份验证的用户';过滤的tweet?
在我的iOS应用程序中,我需要显示包含特定标签的用户推文。在RESTAPI 1.1中有twitterapi。如何获得经过身份验证的用户';过滤的tweet?,twitter,Twitter,在我的iOS应用程序中,我需要显示包含特定标签的用户推文。在RESTAPI 1.1中有用户/search端点。但它认为,这不是一个适合这一点。有search/tweetsendpoint,但我无法为此创建正确的查询。请帮我解决这个问题。GET search/tweets是使用特定标签搜索tweets的正确端点。Twitter在一个月前发布了Fabric,这是一个本机实现API调用的SDK 您可以在此处检查如何执行API调用: 例如: // Objective-C NSString *statu
用户/search
端点。但它认为,这不是一个适合这一点。有search/tweets
endpoint,但我无法为此创建正确的查询。请帮我解决这个问题。GET search/tweets是使用特定标签搜索tweets的正确端点。Twitter在一个月前发布了Fabric,这是一个本机实现API调用的SDK
您可以在此处检查如何执行API调用:
例如:
// Objective-C
NSString *statusesShowEndpoint = @"https://api.twitter.com/1.1/statuses/show.json";
NSDictionary *params = @{@"id" : @"20"};
NSError *clientError;
NSURLRequest *request = [[[Twitter sharedInstance] APIClient]
URLRequestWithMethod:@"GET"
URL:statusesShowEndpoint
parameters:params
error:&clientError];
if (request) {
[[[Twitter sharedInstance] APIClient]
sendTwitterRequest:request
completion:^(NSURLResponse *response,
NSData *data,
NSError *connectionError) {
if (data) {
// handle the response data e.g.
NSError *jsonError;
NSDictionary *json = [NSJSONSerialization
JSONObjectWithData:data
options:0
error:&jsonError];
}
else {
NSLog(@"Error: %@", connectionError);
}
}];
}
else {
NSLog(@"Error: %@", clientError);
}
您可以将搜索api()用于所需的查询。例如
其中screen_name是您想要其推文的用户的screen_名称