Twitter is an online social networking service and microblogging service that enables its users to send and read text-based messages of up to 140 characters, known as "tweets". Use this tag for questions which may arise when developing FOR Twitter. This tag is NOT for support questions about using ...
4
votes
1answer
88 views
Read Twitter users from a text file
I have this code for reading Twitter users from a text file represented by integers in the format "int (space) int", where the first int is the ID of
the user doing ...
4
votes
2answers
55 views
Tweeting NASA's Astronomy Pic of the Day
I want to know how I can make this old code faster, cleaner and compact. It may look like bad code because I did it when I first started with Python.
...
4
votes
2answers
231 views
Get all followers and friends of a Twitter user
I'm trying to find my bug or any potential bottleneck that cause my program to be really slow. The script is to get all the followers and friends and save that in MongoDB.
...
-1
votes
1answer
96 views
The mood of the nation - Twitter trend
This assignment is taken from Berkeley's CS61A page here.
Introduction
In this project, you will develop a geographic visualization of twitter data across the USA. You will need to use ...
4
votes
2answers
56 views
The Geometry of Maps - Twitter Trend
Below assignment is taken from here.
Introduction
In this project, you will develop a geographic visualization of
twitter data across the USA. You will need to use dictionaries, lists,
...
4
votes
1answer
108 views
Assigning sentiment to each tweet - Twitter trend
Below assignment is taken from here.
Introduction
In this project, you will develop a geographic visualization of
twitter data across the USA. You will need to use dictionaries, lists,
...
2
votes
1answer
46 views
Tweeting statistics on shared links
I tend to be rather prolific in my sharing of things I find online. I'm interested in tracking my own habits to make them more effective. Therefore, I submit the above to be critiqued by the lot of ...
4
votes
2answers
110 views
Extracting a number from provided URLs inside a text file
I need to extract a ID (int number) from a Url.
Example: http://www.example.com/foo/bar/12345
For this I wrote 4 methods where the first one ...
8
votes
1answer
95 views
Importing someone's Twitter feed
I used some Java code to work out how often MPs and Senators cited their sources in tweets. The results are at here and the GitHub for the whole project is here, and the Java code I use to download ...
2
votes
2answers
60 views
Accessing tweets from Twitter API
I need help making this code more efficient but still functions the same, such as by making it access the Twitter API fewer times. When I run this code for like 1 min, I get an error from Twitter ...
1
vote
1answer
54 views
Changing the id field to an _id field for the lowest tweet id
I am collecting tweets using a Python script and I want to store them in a MongoDB database.
I want to find out the lowest tweet id and for each tweet, I want to change the ...
4
votes
2answers
51 views
Custom Class to show tweets
I'm busy on a site, and we've made a custom Twitter class. The tweets are send from our panel, where they're posted and saved in the DB. In this class, we get the tweets from the database and show ...
5
votes
2answers
164 views
Making sure a block of code takes at least 5 seconds to execute
I am working on a personal project where I analyse Big Data by using twitter statuses. Therefore I am trying to query the Twitter API as many times as I can.
The API has a limit of 180 queries per 15 ...
10
votes
2answers
371 views
Twitter Streaming Client - Round#2
I've been experimenting with the Twitter Streaming API and would like some critical feedback. Specifically code correctness, code smells, overall structure, and my usage of collections and queues.
...
7
votes
2answers
1k views
Twitter Streaming API Client: Identifying the top trending hashtags for a specific term
I’ve been experimenting with the Twitter Streaming API and would like some critical feedback on my latest project. Specifically code correctness, code smells, overall structure, and my usage of ...
2
votes
2answers
234 views
Small Twitter bot made in Python
I've just started to play around with Python and I've decided to create a little script that post tweets every hour (cronjob on Ubuntu) telling what time it is.
I'm not sure if I follow best ...
3
votes
1answer
80 views
Archiving Tweets via Python
I'm fairly new to Python - though not new to programming by any means. I have this Python script and it works perfect for my needs but being new(er) to Python I'm just looking to see if there are any ...
1
vote
2answers
884 views
Classes for Facebook graph API and Twitter access
Given below is code which I wrote to provide an easy access to Facebook graph API.
...
0
votes
1answer
576 views
Print Tweets/Mentions/Retweets
I've wrote some simple code to load a JSON file from the Twitter Streaming API, parse the data, and create relationships between users based on who mentions or retweets who. My ultimate goal is to ...
5
votes
1answer
407 views
More efficient way to make a Twitter status in a string of just words
I am making an application where I will be fetching tweets and storing them in a database. I will have a column for the complete text of the tweet and another where only the words of the tweet will ...
5
votes
1answer
107 views
JSON data from Twitter to Edgelist?
Following along another code review (Printing out JSON data from Twitter as a CSV?) I would like to submit a slightly adapted code for review.
This code imports JSON data obtained from Twitter and ...
5
votes
1answer
5k views
Printing out JSON data from Twitter as a CSV
I'm extremely new to Python, and the Twitter API, but I found an example online that walked me through the process. Now that I've been playing around with it for awhile, I've begun to push the limits ...
2
votes
1answer
576 views
Getting the list of people who RT'd a particular Twitter account (using Twitter4J)
I'm looking for feedback (both general Java, and Twitter specific) on how I'm getting the Twitter handles of everyone who retweeted me over the last 200 Tweets. Comments welcome.
...
2
votes
1answer
431 views
Using twitter4j to fetch usernames that retweeted me
I'm using using twitter4j to fetch usernames that retweeted me. I'm interested in any feedback that make the code more elegant, and also that might reduce the number of calls I'm making to the Twitter ...
1
vote
2answers
316 views
Uploading a picture to Twitter over a period of time
I wrote a script that will eventually go onto a Raspberry Pi. It takes a picture then uploads it to Twitter every 15 minutes from 5:30-9:00pm.
It works fine as is, but I feel I need to organize ...
3
votes
1answer
97 views
Display Twitter timelines and lists on a website
I've built a Twitter plugin recently and was wondering if I could get some feedback on it. There is also a PHP side that grabs the actual tweets and I can post that code if it's needed.
...
5
votes
1answer
85 views
Plugin for pulling Tweets
I've been working on a jQuery plugin for pulling tweets since the v1 endpoints were all closed off and you need oAuth now. This is just the jQuery part but if you want to see the php behind it I'll be ...
1
vote
0answers
471 views
Script is extremely slow to display results
I have this PHP script below that requests data from the Twitter API and then displays it on the page according to the information that I have in my local database because I stored twitter usernames ...
4
votes
1answer
427 views
Optimizing python code for big data sets
I'm trying to optimize a python string that works on big data sets, the way it works is by taking in a with a list of keywords and scores and taking in a file loaded with data from the twitter api. ...
1
vote
1answer
208 views
Object-oriented Twitter filter
I submitted a previous version of this program but I've completely rewritten it in an Object Oriented style. This is only my second attempt at OO programming so I'm interested in hearing how I can ...
4
votes
1answer
749 views
Insert tags around entities in body
Because we're passing object to Spring Framework in which Jackson classes convert them into JSON as a response, we chose to implement a simpler Tweet class rather ...
2
votes
1answer
1k views
Python Twitter parser
In the interests of improving my Python coding skills, I wanted to post a program I recently built and get it critiqued by you fine folks. Please let me know where you think I might improve this ...
8
votes
3answers
403 views
Calculate karma based on retweets
This script is meant to look for an id in the data attribute in each containment div, then send an Ajax call to get the amount of retweets, calculate the karma based on those retweets and then display ...
5
votes
2answers
444 views
Filtering a Backbone collection with multiple parameters
I've written a short piece of code to get myself familiar with backbone.js. I'm filtering 100 results from the Twitter API. Once those are in, I use a time picker and a hash tag selector to filter my ...
1
vote
1answer
1k views
Tweet feed and Instagram function
This function combines a Twitter feed and an Instagram feed and sorts the items by date. I just want to write better, more efficient code, so any tips on how to transform this into more of a "pro" ...
3
votes
1answer
111 views
Entering and authorizing Twitter credentials
I'm fairly new to Ruby, and I've been refactoring this code (it's a silly app, but it's helping me learn) as I learn more and more best practices and features new to Ruby 1.9 (e.g., hashrocket ...
1
vote
1answer
127 views
Displaying a user's social media information
This is for a page where it displays some social media information for that user.
I would like to improve the following code that I posted below. It does the job perfectly, but I just feel like it ...
2
votes
1answer
236 views
Fetching / formatting / storing tweets to my database
I am periodically getting tweets, formatting them, and storing them into the database. Now the line of code I use for this is an awful lot. I was wondering if this could be improved.
...
11
votes
3answers
1k views