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 240853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:42:05+00:00 2026-05-11T20:42:05+00:00

Consider this: require ‘Twitter.class.php’; $tweet = new Twitter(username, password); foreach($comment as $key => $value)

  • 0

Consider this:

require 'Twitter.class.php';
$tweet = new Twitter("username", "password");

foreach($comment as $key => $value) {
        $link = $db->get_row("sql query");
            //sleep(10;)    
        $tweet->update('$link');
    }
}

This makes a new twitter message for every loop, the loop happens about 10 times and I expect 10 twitter messages to be sent to my account. However, at best only 1 or 2 arrive.

Is there a time that I have to wait between tweets? I have tried the sleep function but that didn’t solve anything. Do I need to wait for longer? I couldn’t find anything much in the documentation.

Before I attempt something such as saving tweets to a DB and using a cron job or something to process the tweets. I prefer to get it working in the above. Please help. 🙂

Thanks all

  • 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-05-11T20:42:06+00:00Added an answer on May 11, 2026 at 8:42 pm

    When looking at the example.php, there is an optional third parameter to the Twitter constructor. If you add a true to as that third parameter, you get an output dump of the data being sent and received. Try turning that on and seeing what happens.

    But, to answer the specific question, there are limits on the Twitter API for how quickly/how much you can do in one hour. See the Twitter API FAQ for information about that. When you were testing, you might have accidentally triggered a blacklist of your IP address. The debug info from Twitter should help.

    If that isn’t enough, you can add a proxy between your PHP code and Twitter (as recommended in the Twitter FAQ) to see the return values; you might be getting some “Stop sending so many updates” type of message that the Twitter PHP code is silently dropping.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would have both. I would keep the files renamed… May 11, 2026 at 11:54 pm
  • Editorial Team
    Editorial Team added an answer You haven't posted any code related to $nodes so I… May 11, 2026 at 11:54 pm
  • Editorial Team
    Editorial Team added an answer Try to refresh your screen by pressing Ctrl+L. If that… May 11, 2026 at 11:54 pm

Related Questions

Consider this: require 'Twitter.class.php'; $tweet = new Twitter(username, password); foreach($comment as $key => $value)
Consider this Python program which uses PyGtk and Hippo Canvas to display a clickable
Consider this code (type names genericised for the purposes of example): // Bound to
If I have a Python script that requires at least a particular version of
I have to maintain an old database which is not properly normalized. For instance

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.