【问题标题】:How to do a RETWEET on an iPhone twitter app (MGTwitterEngine)如何在 iPhone 推特应用 (MGTwitterEngine) 上进行转推
【发布时间】:2011-02-01 11:49:47
【问题描述】:

如何在 iPhone 推特应用 (MGTwitterEngine) 上进行转推

【问题讨论】:

    标签: iphone xcode twitter mgtwitterengine


    【解决方案1】:

    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];
    }
    

    【讨论】:

      【解决方案2】:
      - (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];
      }
      

      【讨论】:

        猜你喜欢
        • 2013-02-03
        • 2012-08-09
        • 1970-01-01
        • 1970-01-01
        • 2012-07-07
        • 1970-01-01
        • 2010-11-07
        • 2011-10-29
        • 1970-01-01
        相关资源
        最近更新 更多