Authenticate error on "GET users/lookup" using TWRequest(API v1.1)


I’m trying the API version1.1 using TWRequest on iOS5.
Only if I call “GET users/lookup” API, received the following authenticate error.

errors =     (
           code = 32;
           message = "Could not authenticate you";

But if I call other API, e.g. friendships/create, in the same way(use the same source code except URL), it worked correctly!!

How can I avoid this error? I have no idea how should I do.
Anyone else with same situation or investigate it?
Thanks in advance.


Thanks for the report. Do you know how the commas are getting encoded when executing the request this way? Have you tried a POST request? TWRequest may expect you to prepare your request with %2C on the query string for commas instead.

v1.1’s OAuth is a bit stricter over all, though it should actually be pretty lenient around comma use.


Thanks, Taylor.

The commas were not encoded as you indicated and fixed the code as following, it worked!
Thank you for your quick reply and kindness.

NSString *url_str_enc = (NSString *)CFURLCreateStringByAddingPercentEscapes(
NSURL *url = [NSURL URLWithString:url_str_enc];
TWRequest *request = [[TWRequest alloc] initWithURL:url parameters:nil


we tried the similar approach for,
in our code its return,
errors = (
code = 215;
message = “Bad Authentication data”;
pls help to resolve.


me too