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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:22:05+00:00 2026-05-16T22:22:05+00:00

I am trying to perform a Twitter search using the PEAR package Services_Twitter. Unfortunately

  • 0

I am trying to perform a Twitter search using the PEAR package Services_Twitter.
Unfortunately this only returns an array of status ids, for example (var_dump):

object(stdClass)#88 (2) {
  ["statuses"]=>
  array(11) {
    [0]=>
    int(49497593539)
    [1]=>
    int(49497593851)
    [2]=>
    int(49497598001)
    [3]=>
    int(49497599055)
    [4]=>
    int(49497599597)
    [5]=>
    int(49497600733)
    [6]=>
    int(49497602607)
    [7]=>
    int(49497607031)
    [8]=>
    int(49497607453)
    [9]=>
    int(49497609577)
    [10]=>
    int(49497610605)
  }
  ["created_in"]=>
  float(0.008847)
}

The script I’m using is similar to this test script I wrote:

<?php
//$oAuth = new HTTP_OAuth_Consumer( /** Supply oAuth details here **/ );
$Twitter = new Services_Twitter();
//$Twitter->setOAuth($oAuth);
try {
    $Response = $Twitter->search(array(
      "q"   => "#FF -RT OR #FollowFriday -RT",
      "rpp" => 10,
      "since_id"  => 23982086000,
      "result_type" => "recent"
    ));
    var_dump($Response);
  } catch (Exception $e) {
    fwrite(STDERR, $e->getMessage());
  }
?>

Since I want to scan the tweets for certain words and want to know when it was posted and by whom, I would need to request all these statuses one by one.
But according to the example response in the Twitter API documentation they already return all the necessary information about the tweets (which is kinda obvious).

So, the question is: How can I access this information using Services_Twitter?

Kind Regards,

Arno

  • 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-16T22:22:05+00:00Added an answer on May 16, 2026 at 10:22 pm

    So as I said ->search() is wrapped through Services_Twitter::__call().

    But here’s the mis-understanding!

    Two searches:

    • http://api.twitter.com/1/search.json?q=@noradio
    • http://search.twitter.com/search.json?q=@noradio

    This is confusing as search.twitter.com returns the results as you’d expect them and the other API method just the status IDs.

    For some reason only when you search for trends search.twitter.com is used. Otherwise it’s the API methods. If you want to help, please open a ticket on PEAR and I can try to implement this for you.

    A quickfix for you is this script:

    <?php
    $uri  = 'http://search.twitter.com/search.json?';
    $uri .= http_build_query(
        array(
            "q"           => "#FF -RT OR #FollowFriday -RT",
            "rpp"         => 10,
            "since_id"    => 23982086000,
            "result_type" => "recent"
    ));
    
    $response = file_get_contents($uri);
    if ($response === false) {
        fwrite(STDERR, "Could not fetch search result.");
        exit(1);
    }
    
    $data = json_decode($response);
    var_dump($data);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this situation I am trying to perform a data import from an XML
I was trying to perform basic authentication for Twitter from my Qt app. I
I'm trying perform a relatively basic TCP socket send/receive operation on Windows CE using
I'm trying to perform a join in ActiveRecord using DetachedCriteria. I can't seem to
Trying to perform a single boolean NOT operation, it appears that under MS SQL
I'm trying to perform a LINQ query on a DataTable object and bizarrely I
I'm trying to perform a SQL query through a linked SSAS server. The initial
I'm trying to perform a bitwise NOT in SQL Server. I'd like to do
I'm trying to perform a simple LINQ query on the Columns property of a
I'm trying to perform a simple INSERT and return the identity (auto-incrementing primary key).

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.