How could I get Twitter data for research?


hey but how will you get the tuple??


OK, so a friend of mine in China helped me figure it out successfully by using php to magically export tweets into excel format. Here are his source code, which I have no idea what that is, but hopefully it would be helpful:

function getConnectionWithAccessToken($oauth_token, $oauth_token_secret) {
    $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $oauth_token, $oauth_token_secret);
  return $connection;

$connection = getConnectionWithAccessToken("xxxxxxxxxxx-i2IBb0tbBLJftCwJNn3RI0Qz9aguGoCjomMSfvH",                   "4CDJVgV7jPSULlxxxxxxxxxDM4ZkOBTolh4wP");

$list = array('ADMN_Minnesota','MNagriculture','mndnr','MinnCorrections','MNCommerce','MnDeptEd','mndeed',         'mnhealth','MinnesotaDHS','mnhousing','mnhumanrights','mndli','MetCouncilNews','mndnr','IRRRB','CCLRT',            'MetCouncilNews','MinnesotaManagementandBudget','MnPCA','mnstateparks','mndnr','mnoetnews','MNsure',               'GovMarkDayton','MnDPS_DPS','MnDPS_MSP','MnDPS_HSEM','MnDPS_SFM','MnDPS_OTS','MNRevenue','mndottraffic',           'MNVeteran','MNNationalGuard');
foreach ($list as $agency) {
    $content = $connection->get("statuses/user_timeline", array('screen_name' => $agency, 'count' => 500,          'include_rts' => TRUE));


Hi, I want to get twitter multimedia data for my research.
Could please anyone help me with that?


Hi everyone, I am planning to work on the role of twitter in Egypt during arab spring. For this research I need to get data from 2011 to 2013. I do not have knowledge of statistics and want to do content analysis of the tweets. I am really not understanding many terms used in this thread, Can anyone please help me to proceed?


Hi @anshul, I am doing my research on twitter sentiment analysis. Can you help me how to collect twitts?


Hi Anshul @anshulbits, I am a PhD scholar, Doing research on sentiment analysis. I need to collect some twitter data for my research purpose. Can you help me how to collect sufficient number of twitts?


Hi I am not able to open the Resource URL
After giving the twitter username and password it shows

Problem accessing ‘/1.1/statuses/sample.json’. Reason:



Hi, Can you help me how to get the twitter data? I need for me research purpose.


Hello, not sure if you found the answer. you can use R, there few prebuild packages to use.hope it helps.


Hi all, I am trying to work on sentiment analysis using twitter, but how to collect the tweets, I tried using search API but it asks for OAuthentication. How to generate this auth code. Please help.


Any Advice!
I need a historical data for my research and just received a scary quote for $38,000


After you’ve created yourself an app ( and the required credentials for OAuth, you can easily use tweepy[1] for python to download tweets.



hello Anshul

i do really need help in getting these data from tweeter. would you please help me to fetch these data in the link.
i am doing data mining analysis based on these data for must the countries. i am a master student in forensic computing. would you please get back me to as soon as possible. read the link it state on how to download these datasets using PHP or Python which i don’t have enough knowledge on them. i planed to do data prepossessing in R.

many thanks



can anyone help me please to download the data set in the link above? thanks


Hi @anupamjamatia. If you need some help about collecting tweets just tweet me. Salute!


Check out Chapter 1( a freebe) from O’reilly of Mining the Social Web 2nd Edition and the appendices that show you all the details you need.



Hi @anupamjamatia, Any success so far on this ? If yes, I need your help.


Is there a way to do the analysis all through javascript? Thanks!


did u get any help? would you like to help me ? I am a Ph.D studenta nd really in need ! how can I fetch twitter data on social movements.


Hi there, did you figure out how to do this? I am doing PhD research on this same topic.