如何在iPhone Twitter应用程序(MGTwitterEngine)上进行RETWEET
答案 0 :(得分:5)
似乎在mattgemmell / MGTwitterEngine中尚未支持此功能。
与此同时,您可以通过引用此MGTwitterEngine变体将该函数添加到当前版本的MGTwitterEngine: freeatnet / MGTwitterEngine
- (NSString *)sendRetweet:(unsigned long)updateID
{
if (updateID == 0){
return nil;
}
NSString *path = [NSString stringWithFormat:@"statuses/retweet/%u.%@", updateID, API_FORMAT];
return [self _sendRequestWithMethod:HTTP_POST_METHOD path:path
queryParameters:nil body:nil
requestType:MGTwitterUpdateSendRequest
responseType:MGTwitterStatus];
}
答案 1 :(得分:1)
- (NSString *)sendRetweet:(unsigned long)updateID
{
if (updateID == 0){
return nil;
}
NSString *path = [NSString stringWithFormat:@"statuses/retweet/%u.%@", updateID, API_FORMAT];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
[params setObject:[NSString stringWithFormat:@"%@", updateID] forKey:@"id"];
NSString *body = [self _queryStringWithBase:nil parameters:params prefixed:NO];
return [self _sendRequestWithMethod:HTTP_POST_METHOD path:path
queryParameters:params body:body
requestType:MGTwitterUpdateSendRequest
responseType:MGTwitterStatus];
}