bengottlieb / Twitter-OAuth-iPhone

An easy way to get Twitter authenticating with OAuth on iPhone
http://www.standalone.com
799 stars 155 forks source link

SA_OAuthTwitterEngine _sendRequestWithMethod:.... fails to apply params on GET #80

Open tblanchard opened 13 years ago

tblanchard commented 13 years ago

I was trying to add a method to implement followers/ids.json which is a GET. Tracing the code I find

// --------------------------------------------------------------------------------
// modificaiton from the base clase
// the base class appends parameters here
// --------------------------------------------------------------------------------

and then the code that does it is commented out. But there is nowhere in this method where params gets used unless you are doing a POST. Since the convention is to pass nil for method: when it is a GET, I added the following code here.

if (!method && params) {
        fullPath = [self _queryStringWithBase:fullPath parameters:params prefixed:YES];
}

and now things work as expected. I don't understand how it was supposed to have worked at all for GET requests.

Otherwise your sample project was great and really helped me get going.