Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9065085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:24:55+00:00 2026-06-16T16:24:55+00:00

I am new to twitter API started working on it on PHP using this

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:24:56+00:00Added an answer on June 16, 2026 at 4:24 pm

    Lots of problems in your code.

    1. You are using API version 1.0. users/lookup is not available in 1.0. Its introduced in 1.1. Use endpoint https://api.twitter.com/1.1/ first.
    2. user/lookup is a GET request not POST. see GET user/lookup. Use $twitter->get() method.
    3. Rate limit for GET users/lookup is 180 per 15 minute window. Thats 720 per hour. See REST API V1.1 Limits

    Your final code should something like this,

    $twitter->host = "https://api.twitter.com/1.1/";
    $userInfo= $twitter->get( 'users/lookup', array('user_id' => "".$id));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Abhraham's twitter API library. My index.php <?php ob_start(); session_start(); require_once 'twitteroauth/twitteroauth.php'; require_once
I am new to using Twitter - API, how do I use PHP to
I am new to twitter API and I am using the Abraham Williams PHP
Is it possible follow people on Twitter using the new Twitter API in iOS
I am trying to integrate twitter api using library twitter4j-core-2.1.1-SNAPSHOT.jar. But i am getting
I'm using the new twitter @anywhere api for logging in on the client using
We are parsing the Twitter API in our application. This used to be working
I have problems with the new Twitter API: v1.0 is working without problems, but
I'm trying to consume twitter's REST api mentioned at this link using WCF REST
Trying to follow someone on Twitter using new iOS 5 API, getting 406 return

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.