hi,
I've succeeded in deploying hashtag app at this url:
http://young-river-7112.herokuapp.com/
So, far no issues.
Sorry for the initial problems. Actually i was not using heroku cedar
stack for this app.
regards
sonu kumar
On Feb 8, 8:10 pm, "Ashish (Pocha) Sharma" <
po...@stalkninja.com>
wrote:
> Hi guys,
> Finally I got time to work on the twitter angellist app which Utkarsh has started doing sometime back (new guys, please refer the thread below).
> Since Utkarsh was too concise with his email (not his fault, he might not realize that stalk ninja has more newbies than pros), I thought of setting it all up & doing changes myself. If anybody is interested to contribute (there are couple of things needed here on), please read on.This is a good opportunity to learn some ruby on rails, git, working with github, deploying to heroku etc.
> 1. Utkarsh has his repo (shortform for repository) athttps://
github.com/utkarshkukreti/twitter-angellist-bridge. Ideally Utkarsh could have added me as a contributor to his repo, but since he was unavailable, I made my own repo athttps://
github.com/pocha/hashag/. 'hashag' or 'hashAg' (actually #ag) is the codename of this project going ahead.
> 2. Its an open repo. Install git on your PC & clone a copy of the repository. Absolute newbie would need sometime getting used to git here.
> 3. This is an app build on Rails. But the handicap is - this app cant run on your PC (or localhost). The app needs to authenticate with twitter & angellist. There is something called oAuth & these guys need to send back a token back to your app. Running an app on localhost makes it impossible (for newbies - its like nobody can reach your PC from outside your local intranet).
> You need to deploy it on a public server. This brings in the story - where are free rails server. Heroku is the most popular choice & Utkarsh has chosen the same. I am heroku newbie but my past 2 days working with it made me fell in love with it. The startup deserve every single penny they have raised as investment.
>
> Coming to the point - you need to learn how to deploy this code on heroku. I have deployed it athttp://
blooming-frost-6120.herokuapp.com/. You need to get rails installed on your PC now. I have put heroku gem in the gemfile. Once you get rails on your PC, launch the rails terminal, migrate to the app folder & run 'bundle install'. It would install all the dependencies for the project (including heroku).
> 4. Look around the code as it is time to do some real coding. Check the list of features below & if you are able to figure out how to implement one/some of them, ping me & I would add you as contributor on heroku,so that you can deploy the updated code directly on my heroku server.
> Current implementation :-
> 1. You need to have a twitter & angellist (
angel.co) account to be able to use the app. Register at both places. Create a temp startup in your angellist account.
> 2. Go tohttp://
blooming-frost-6120.herokuapp.com/, authenticate with your twitter & then angellist. Get your startup id from your domain (mine is
stalkninja.com).
> 3. Now go to twitter & tweet from your account with '#ag' in it. Come back to the app, hit on 'Check & publish my tweets to angellist'. The app would fetch the tweets & would publish it on your startup profile.
> Going ahead :-
> 1. Now, I just wrote the code to check the last tweet of the user with #ag . Fetching again would repeat the tweet. This is wrong. The tweets have an id (something like a timestamp) & you can search the tweet with 'since_id' -
http://rubydoc.info/gems/twitter/Twitter/Client/Search. Basically everytime the code checks for tweets, it should record the latest id of the tweet in 'since_id' field in database so that next time, the code would only check from that 'since_id'. The code is in 'app/controller_tweets_controller.rb'
>
> 2. Once point 1 is done, this fetching & publishing needs to be automated. This can be done using a rake task.
> 3. We need to give a nice UI for it to be usable by general audience. Bootstrap css framework from twitter would be awesome to use. This is lowest in priority though.
> For complete newbies :-
> I am sure there are quite a few guys who are not confident enough to contribute straight away. But looking to learn. You should get the code & install the app on your own server to learn it first. Here is what you should do.
> 1. As said above, get the code using git, install rails on your PC etc.
> 2. Get yourself an account athttp://
heroku.com. Come back to your rails code base directory. Do 'heroku login' & pass your details. Followhttp://
devcenter.heroku.com/articles/git& it would create your own app with an awesome name (mine is blooming-frost-6120).
> 3. The app authenticates via twitter & angellist. You need to create your apps athttp://
dev.twitter.com/apps&http://angel.co/api-> Your Apps . The 'callback url' is important. This is the url to which twitter/angellist sends you oauth token back. My callback url ishttp://
blooming-frost-6120.herokuapp.com/auth/twitter/callbackfor twitter &
http://blooming-frost-6120.herokuapp.com/auth/angellist/callbackfor angellist. You need to specify yours according to your url.
> 4. Come back to your rails app home directory. Add keys & secret of your twitter & angellist apps as
>
> heroku config:add RAILS_ENV=development TWITTER_KEY=<xxx> TWITTER_SECRET=<xxx> ANGELLIST_KEY=<xxx> ANGELLIST_SECRET=<xxx>
>
> These values will be used in config/initializers/omniauth.rb .
> 5. Do 'git push heroku' for the app to be deployed & launch on heroku. Once you are at this point, you are good to start reading the code to see if any of the points in 'Going ahead' makes sense.
>
>
> Lets take the app to the next level. Happy learning :).
> Ashish (Pocha) Sharma,Stalk Ninja- Connecting senior hackers to college hackers 'meaningfully'+91 95 3838 4545begin_of_the_skype_highlighting
+91 95 3838 4545 LinkedInTwitter
> On 01/16/2012 03:34 PM, Utkarsh wrote:I attempted this a few days ago. Here's the current state -
https://github.com/utkarshkukreti/twitter-angellist-bridge
>
>
>
> ## What's left
>
> - Create a rake task that fetches the latest tweets of a user (that it already hasn't scanned; store last tweet scanned in the users table), and post tweets containing #ag to angellist. This task will be run every 10 minutes using a cron job. All credentials are present in the users table, and the gems required are present too.
>
> - Improve UI
>
>
>
> Feel free to fork the repo and start working. I'll try to review the code if you ping me on github.
>
> --
> Stalk Ninja fb page -
http://www.facebook.com/pages/Stalk-Ninja/139273162793864
> Stalk Ninja on twitter -
http://twitter.com/stalkninja
>
> You received this message because you are...
>
> read more »