Hi everyone,
I’m developing a php web application using codebird php library and I was wondering if any of you can help me, I tried to connect to a endpoint but my english is so bad and I don’t understand the documentation, if you can send me an example to view how to connect and make a track request I’d appreciate it very much.
Now i have that code:
<?php
require_once('codebird.php');
\Codebird\Codebird::setConsumerKey('CONSUMER KEY', 'CONSUMER SECRET');
$cb = \Codebird\Codebird::getInstance();
$cb->setToken('TOKEN KEY', 'TOKEN SECRET');
function some_callback($message){
if ($message !== null) {
echo "<p>";
print_r($message);
echo "</p>";
flush();
}
if (time() - $GLOBALS['time_start'] >= 60) {
return true;
}
return false;
}
$cb->setStreamingCallback('some_callback');
$GLOBALS['time_start'] = time();
$reply = $cb->statuses_filter('track=happy');
?>
How can i do that the request never stop automatically?
Thanks!