twitter - iOS retweet with SLRequest returns bad URL error -


i'm implementing retweet functionality keep getting bad url error after post. here's code:

slrequest *twitterrequest = [slrequest requestforservicetype:slservicetypetwitter requestmethod:slrequestmethodpost url:[nsurl urlwithstring:@"https://api.twitter.com/1.1/statuses/retweet/%@.json"] parameters:[nsdictionary dictionarywithobject:tweetid forkey:@"id"]];  [twitterrequest performrequestwithhandler:^(nsdata *responsedata, nshttpurlresponse *urlresponse, nserror *error) {   dispatch_async(dispatch_get_main_queue(), ^{      if ([urlresponse statuscode] == 429) {         nslog(@"rate limit reached");         return;     }      if (error) {         nslog(@"error: %@", error.localizeddescription);         return;     }    }); }]; 

any ideas? missing anything? thanks!

my bad. forgot pass string when creating request "...%@.json".

i.e.

slrequest *twitterrequest = [slrequest requestforservicetype:slservicetypetwitter requestmethod:slrequestmethodpost url:[nsurl urlwithstring:[nsstring stringwithformat:@"https://api.twitter.com/1.1/statuses/retweet/%@.json",@"490794578250059776"]] parameters:nil]; 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -