Nasıl Services_Twitter kullanarak bir arama sorgusu gerçekleştirmek için?

0 Cevap php

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)
}

I istimal komut yazdım bu test komut benzer:

<?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).

Yani, soru şudur: Nasıl Services_Twitter kullanarak bu bilgilere erişebilir?

Saygılarımızla,

Arno

0 Cevap