Closed hlung closed 9 years ago
Thanks for wanting to contribute, but I don't think you understand just how BDBOAuth1SessionManager works. BDBOAuth1SessionManager is a subclass of AFHTTPSessionManager, meaning it inherits all of the methods defined in AFHTTPSessionManager. The OAuth-specific methods that are added in BDBOAuth1SessionManager are for the sole purpose of performing the OAuth handshake, after which you simply use the methods already defined in AFHTTPSessionManager.
You can perform the same request as your code is trying to perform simply by using one of the existing GET, POST, or other convenience method defined in AFHTTPSessionManager. You should take a look at the documentation of AFHTTPSessionManager.h for reference.
Yeah I can use AFHTTPSessionManager
to send the request. But I have to use BDBOAuth1RequestSerializer
to create the request itself, and making sure the responseSerializer is AFJSONResponseSerializer
. I figure those out by digging into the lib a bit. It's not that hard, but I think having this will help others do this more easily.
That's just my idea. I totally understand if you want to keep this lib to only handle the handshake part and note merge this in. Up to you then :)
I was working with Fitbit API using your lib. I can request request_token and access_token no problem. But after that, it's missing the ability to send generic OAuth signed requests to fetch other JSON data after I have acquired the permanent access token. So I added it. :)
I tested this method in my personal project so it should work correctly. I’m not sure how to write test for this method or ensure its functionality in someway in your project though.