【发布时间】:2011-02-01 11:49:47
【问题描述】:
如何在 iPhone 推特应用 (MGTwitterEngine) 上进行转推
【问题讨论】:
标签: iphone xcode twitter mgtwitterengine
如何在 iPhone 推特应用 (MGTwitterEngine) 上进行转推
【问题讨论】:
标签: iphone xcode twitter mgtwitterengine
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];
}
【讨论】:
- (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];
}
【讨论】: