0

I'm trying to manage this library and want to make a retweet messages.

The method in particular is this:

- (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 pathath 
queryParameters:nil body:nil 
requestType:MGTwitterUpdateSendRequest
responseType:MGTwitterStatus];


}

This method is not implemented in the library itself and I've added.

i don´t know what is the updateId. i try to used a id from the json but i don´t know what is the correct id..:

See dictionary: {

contributors = "";
coordinates = "";
"created_at" = "Wed Aug 24 07:41:50 +0000 2011";
favorited = false;
geo = "";
id = **106269972766011392**;
"in_reply_to_screen_name" = "";
"in_reply_to_status_id" = "";
"in_reply_to_user_id" = "";
place = "";
"possibly_sensitive" = false;
"retweet_count" = 0;
retweeted = false;
source = "<a href=\"http://www.tweetdeck.com\" rel=\"nofollow\">TweetDeck</a>";
"source_api_request_type" = 1;
text = "Buenos d\U00edas familia! Vuelve Tom Waits... http://t.co/3fbLqbb #musica";
truncated = 0;
user =     {
    "contributors_enabled" = false;
    "created_at" = "Tue Jan 13 14:25:32 +0000 2009";
    "default_profile" = false;
    "default_profile_image" = false;
    description = "Twitter Oficial de Vodafone Espa\U00f1a para compartir noticias y novedades ";
    "favourites_count" = 4;
    "follow_request_sent" = false;
    "followers_count" = 26260;
    following = 1;
    "friends_count" = 11928;
    "geo_enabled" = false;
    id = 18939115;
    "is_translator" = false;
    lang = en;
    "listed_count" = 1429;
    location = "from Madrid";
    name = "vodafone_espa\U00f1a";
    notifications = false;
    "profile_background_color" = BADFCD;
    "profile_background_image_url" = "http://a1.twimg.com/profile_background_images/303932010/twitter_ro3.jpg";
    "profile_background_image_url_https" = "https://si0.twimg.com/profile_background_images/303932010/twitter_ro3.jpg";
    "profile_background_tile" = false;
    "profile_image_url" = "http://a1.twimg.com/profile_images/1299308789/Twitter-800x800pxNEW_normal.jpg";
    "profile_image_url_https" = "https://si0.twimg.com/profile_images/1299308789/Twitter-800x800pxNEW_normal.jpg";
    "profile_link_color" = FF0000;
    "profile_sidebar_border_color" = F2E195;
    "profile_sidebar_fill_color" = ebebeb;
    "profile_text_color" = 0C3E53;
    "profile_use_background_image" = true;
    protected = 0;
    "screen_name" = "vodafone_es";
    "show_all_inline_media" = false;
    "statuses_count" = 8109;
    "time_zone" = Madrid;
    url = "http://www.vodafone.es";
    "utc_offset" = 3600;
    verified = false;
};

}

See if someone used this functionality and I can lend a hand!

Thank you very much in advance!

Michael Kohl
  • 66,324
  • 14
  • 138
  • 158

1 Answers1

0

Try changing the %u in the following code to a %@ and pass update ID as NSString

NSString *path = [NSString stringWithFormat:@"statuses/retweet/%u.%@", updateID, API_FORMAT];

Update IDs in twitter have long passed unsigned int max values :-).

Also you have to update the method signature to pass string instead of unsigned int.

sumitkm
  • 733
  • 6
  • 29