I am trying to get the list of user id, screen name and profile image link of all the users, that I am following on twitter from the application in iOS5. For that Initially I am posting following link to get the user_id of all my friends-
"https://api.twitter.com/1/friends/ids.json"
Once I receive the response for above URL which is list of all the user_ids of friends I am following on Twitter, I concatenate all the user ids in single String, and then use the following URL, to get the JSON, which will contain the required details for all the users that I am following --
"https://api.twitter.com/1/users/lookup.json?user_id=420107765,383684745,312790865,85462891,164199168,140856038&include_entities=screen_name"
Here, the problem I am facing is, if the number of friends I am following is more, I am getting API limit exceed error, although I am making API calls only 2 times.
What is shocking is, I still can make other twitter API calls, but when I make lookup/users call to get the info of just 5 to 10 users, still it gives me following error ---
Printing description of result: { error = "Rate limit exceeded. Clients may not make more than 150 requests per hour."; request = "/1/users/lookup.json?user_id=50851703,86254626,88856792,6253282,18839785,145125358,135421739,170416270&include_entities=True&application_id=uk.co.vipul.twt"; }
Can someone please give me the solution for this problem. Thanks in advance !!!