I have a RoR 3 application and I'm trying to integrate it with Twitter. So what do I need?
I need to count how many tweets with a certain hashtag (like #awesometag) were tweeted by users that follow me.
There are many ways to do this, as I saw while searching online. However, I want to know the most reliable way to do this.
Thanks!
There is a Twitter gem for all this stuff. If im not mistaken there is a Search class for doing what you want. More info about this gem
Related
I am trying to display a chosen users tweets in my rails app. Right now the way I have it, it is pulling up their tweets and any time they are mentioned. I just want the tweets that they post and nothing else. I will not have their log in info. This will just work for public accounts. This is the code I have so far.
client.search(user_id=#band.twitter).take(20).collect do |tweet|
the #band.twitter is where I am storing the bands twitter handle.
Any help would be much appreciated.
This seemed to have Worked for me.
client.user_timeline(#band.twitter).take(20).collect do
I am creating a messaging system for my web app and need help with searching for users to send messages to. So far I have it so that if you type a persons name (who is on the site) you can send a message to them. I want it to be as you start typing a persons name, a drop down appears with users names that the current user is following. Any thoughts on how I can do this?
I am using the gem mailboxer also wondering if anyone has suggestions for a better messaging gem. Thanks in advance.
Use jQuery autocomplete, and just populate the dropdown contents as all users that the user is following... something like current_user.followed_users. It's impossible to give code without seeing how your code works though.
A good alternative to jquery autocomplete is http://loopj.com/jquery-tokeninput/ and github at: https://github.com/loopj/jquery-tokeninput. A facebook like tagging to send message to multiple users. A demo app on https://github.com/railscasts/258-token-fields-revised/tree/master/bookstore-tokeninput-after from Ryan Bates from Railscasts http://railscasts.com/episodes/258-token-fields-revised
Good luck.
In my Rails 3 app I have Users, Products, and Likes. If a User posts a Product, and another User Likes this Product, I want that User to get a notification that their Product was Liked.
Is there an existing gem that handles this? I've only come across Pusher but that seems to be overkill.
There are a couple of gems that do that:
RailsActivity
https://www.ruby-toolbox.com/categories/Rails_Activity_Feeds
PublicActivity
http://railscasts.com/episodes/406-public-activity
https://github.com/pokonski/public_activity
I have never used them (although i probably will do it tomorrow ^^) so maybe someone with more experience can give you a better insight given your requirements (or read some part of the documentation)
All the gems that are mentioned above by different people is for implementing activity feed.There is lot of difference between implementing facebook news feed and facebook notification system.
For implementing notification system, I recommend you to check these links.
Gritter
Link
Have you seen this http://railscasts.com/episodes/260-messaging-with-faye ? Faye is used in the example. I'm not sure if you'd still consider it an overkill.
I would like to apologize first if the question is a total newbie question, but I really am a total newbie on this.
I'm a student and I recently have joined a project that involves studying (mining) tweets. The project head asked me to use the Twitter API to extract tweets. What exactly is Twitter API and how can I use it? What do I need to know to start using it?
Twitter allows you to interact with its data ie tweets & several attributes about tweets using Twitter APIs. You'd need to know a server side scripting language like php, python or ruby to make requests to twitter api and results would be in JSON format that can be easily read by your program.
A good starting point would be reading the official documentation at https://dev.twitter.com/ itself.
Throw you can use and show some functionality in your website
Koala provides a very easy way to post a status update on a user's wall for Facebook. I was wondering if a gem existed to do similar things with Twitter: in other words, I'm looking for a gem that makes it easy to allow your application to tweet something for a user.
Any suggestions much appreciated.
This is well documented and maintained:
https://github.com/jnunemaker/twitter