Apache Spark Twitter streaming - twitter

I have an application that makes it possible for users to add hashtags that will be followed on Twitter and also to follow other users if they have Twitter accounts registered on the application. These functionalities are implemented using twitter4j. However, since I'm redesigning application at the moment I wanted to improve it and implement using Apache Spark Twitter streaming, so I have two questions about it:
1) Is it possible to create filter with users twitter ids that I want to follow?
2) Since application makes it possible for end users to add new hashtags often, my current implementation has been implemented in such a way that each time new hashtag has been added, twitter stream has to be stopped and initialized again. Is there any more efficient way to add new hashtags without interrupting stream, or that is the only way to add new hashtag?
Thanks,
Zoran

Related

Displaying tweets from multiple users (similar to Embedded Timelines) without twitter-side user lists

I am new to Twitter and need some tips.
I need to display tweet feed from multiple users on some webpage.
The first thing I stumbled upon is Embedded Timelines. It allows to display tweets from list of users but the gotcha is that those lists should be maintained on Twitter-side (i.e. I cannot specify #qwe and #asd only on my side and get timeline without adding those users into list on Twitter-side).
The thing is that list of users that should be included into timeline is dynamic and managing those lists through Twitter API will probably be painful. Not to mention that my website will probably generate tons of those lists and I feel that I will violate some api quotas sooner or later.
So, my question is - am I stuck with using Embedded Timelines that refer some user list on Twitter-side and managing those lists through, say Twitter REST api, or there is a simplier way to do what I want?
It's pretty simple to display tweets for multiple users.
Links to start with
This post explains some of the search queries you can make
This post is a simple library to make requests to the twitter API that 'just works'
Your Query
Okay, so you want multiple users. The endpoint you're looking at using is the search/tweets one: https://api.twitter.com/1.1/search/tweets.json.
The query string uses :from and you can interpolate multiple froms with AND/OR.
An example query for the GET request:
?q=from:user1+OR+from:user2
Read more about the search API queries here.
Your "over-the-quote" issue
This is something you're going to need to figure out yourself - depending on the number of requests you expect to make, and the twitter imposed limits, maybe some sort of caching or saving information when you hit your limit, and only pull back from the cache whilst you're hitting your limit..

Is it possible to make a custom, realtime twitter widget?

I'm having a bit of trouble finding any resources about making a custom Twitter widget for a site.
Basically, I want to create a realtime twitter feed to implement within a site, that automatically updates every few seconds to show new tweets.
I know this used to be possible, but it seems like Twitter just wants me to use their default widget these days instead of my own solution.
Does anyone have any tips / links to good resources?
Thanks in advance!
A possible solution is available which can be implemented in our website. You can try twitters streaming API. Its a technique of keeping a permanent connection between two endpoints; one at twitter side and other at our website. The technique is similar to a chat application where connected ports listen for any changes and update the changes in our side.
Please refer twitters streaming API

Display a list of twitter accounts with twitter controls/info

I have some lists of twitter accounts that I would like to recommend on my website (e.g. follow these great crafting bloggers). If I have the twitter ID for each of these people, is it possible to create a list of items that show their twitter info (pic, number of tweets/followers, etc.) as well as controls that allow the user to follow each (or multiple) twitter account? I'd like to be able to do it dynamically based on the list of accounts so that I can update the list and not have to redesign the page. I feel like I've seen this around the web before, but I don't see any widgets for doing it and I'm wondering how it's done.
(I would like to use javascript/jquery, but am pretty flexible here)
Thanks!
Jeff
I would first look at the Twitter API. You will find more information on how Twitter works, and you may find information applicable to what you want to accomplish on your website. It's a start, and there's no better place to start than the source itself.

iOS and twitter integration - getting multiple users' statuses

I'm interested in adding a twitter feed to my iOS app but I had a quick question: I'd like to stream the most recent updates from a group of about 10 different users - is there a way to do this directly using the twitter api? (Just to clarify - I'm trying to make an app for a sports team and id like a section where users can check out the most recent tweets from all the athletes)
I've been looking around but I can't find a way to do this directly. I'd rather not search for each account individually and have to aggregate the results. Any thoughts on how to handle this?
thanks
Looking here: https://dev.twitter.com/discussions/3941 seems to make me think it cannot be done directly. They recommend creating a list and simply pulling that feed. Another idea would be creating an account that only follows the users you're interested in and pulling that feed. Not sure how appropriate that would be.

How to let users post links/images to Facebook, Twitter, Buzz etc... from a Rails based website?

I'd like to offer users the ability to post images / links to articles from my web application to Facebook, Twitter, Buzz and any other social network.
A perfect example of the functionality I'm trying to replicate is mashable.com ... where each social network is represented by an icon that a) shows the number of shares AND b) allows users to click on it to post to that specific network.
Don't know if it matters ... but the site is built using RoR.
Thanks
Here are the links for adding those social media buttons to your site:
Facebook:
http://wiki.developers.facebook.com/index.php/Facebook_Share
Twitter:
http://help.tweetmeme.com/2009/04/06/tweetmeme-button/
Buzz:
http://www.google.com/buzz/api/admin/configPostWidget
I would first study the available APIs/Webservice documentations of Facebook, Twitter etc. You will learn if and how your features could be implemented. After that you have to write clients for each service. It doesn't matter if you are using Rails or another framework, Ruby or another language. It's all about HTTP requests/responses (or SOAP). There's also a good chance that somebody has already written a library, plugin or gem for your tasks.

Resources