Hi, I’m Luís, evangelistic developer of Twitter here in Brazil. Twitter has multiple endpoints in the API that let you access what you need. It wasn’t clear which language you want to use, but I’ll give the example in PHP, since you mentioned it. To connect in the API you need:
- Create an app in apps.twitter.com
- Get 4 access keys: consumer_key, consumer_secret, access_token_key, access_token_secret (in your app on apps.twitter.com)
- Configure these keys in the library you will use:
The most recommended library for PHP is tmhOAuth, see an example of how to search for tweets, available at https://github.com/themattharris/tmhOAuthExamples/blob/master/cli/search.php:
<?php
require __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'tmhOAuthExample.php';
$tmhOAuth = new tmhOAuthExample();
$code = $tmhOAuth->apponly_request(array(
'method' => 'GET',
'url' => $tmhOAuth->url('1.1/search/tweets'),
'params' => array(
'q' => 'tmhoauth'
)
));
$tmhOAuth->render_response();
You can also get the graph from a user, as shown in the example from the same repository: https://github.com/themattharris/tmhOAuthExamples/blob/master/cli/followings.php
I suggest taking a look at the following references:
The most important thing was missing. In what language? It puts a context of what you want to do. Read [tour] and [Ask].
– Maniero
Sorry man, I think it’s clearer now.
– OMaths
Buddy take a look at this guy https://storm.apache.org/ I’m using it in my tcc. It’s pretty cool!
– Brunno