I am new to twitter API started working on it on PHP using this library.
// connecting to it and asking for user look up
$twitter = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);
$twitter->host = "https://api.twitter.com/1/";
$userInfo= $twitter->post( 'users/lookup', array('user_id' => "".$id)); // i am talking about this line
here I am calling users/lookup for each id I have (I know I can put multiple ids comma seprated) but I didn’t know that before; any way I noticed I get the rate limit of 150 calls why can’t I do more? it should 350 calls since I am using Oauth, is this correct?
What am I doing wrong?
Lots of problems in your code.
1.0.users/lookupis not available in1.0. Its introduced in1.1. Use endpointhttps://api.twitter.com/1.1/first.user/lookupis aGETrequest notPOST. see GET user/lookup. Use$twitter->get()method.GET users/lookupis180per15minute window. Thats720per hour. See REST API V1.1 LimitsYour final code should something like this,