I’m trying call the “lookup” method on multiple users on Twitter. According to the documentation, this is feasible.
http://apiwiki.twitter.com/w/page/24142947/Twitter-REST-API-Method:-users-lookup
I’m calling the method and stringing together 5 IDs separated by commas.
Here’s my call:
access_token = twitter_oauth_access_token(user.twitter.token, user.twitter.secret)
response = access_token.get("/users/lookup.json?user_id=#{ids.join(',')}")
ActiveSupport::JSON.decode(response.body)
I’ve verified that there are multiple IDs in the “ids” variable. The problem is that no matter how I call it, I only get the first one in the list back. So the call is successful, but it doesn’t give me the list of results as the documentation says.
Any idea what I might be doing wrong?
I figured it out. The API URL was incorrect. It should’ve been:
instead of