twitter / twurl

OAuth-enabled curl for the Twitter API

Home Page:https://developer.twitter.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting message "-bash: twurl: command not found" tho twurl and oauth are installed

MemeRunner opened this issue · comments

Yesterday, I was successfully calling the Twitter API through Google Cloud Shell, and today, all twurl commands return "-bash: twurl: command not found".

I'm not understanding the meaning of "-bash:" and haven't been able to find anything searching.

Expected behavior

I was expecting to have the Twitter API return a list of tweets based around my command "twurl h '/1.1/search/tweets.json?q=%23voicefirst&result_type=popular' | jq ."

I checked to make sure twurl and oauth were installed:
d@cloudshell:~ (hashtag-voicefirst)$ gem install twurl Fetching: oauth-0.5.4.gem (100%) Successfully installed oauth-0.5.4 Fetching: twurl-0.9.3.gem (100%) Successfully installed twurl-0.9.3 Parsing documentation for oauth-0.5.4 Installing ri documentation for oauth-0.5.4 Parsing documentation for twurl-0.9.3 Installing ri documentation for twurl-0.9.3 Done installing documentation for oauth, twurl after 0 seconds 2 gems installed

Actual behavior

d@cloudshell:~ (hashtag-voicefirst)$ twurl accounts -bash: twurl: command not found

Steps to reproduce the behavior

Issuing any of the following commands in Google Cloud Shell
d@cloudshell:~ (hashtag-voicefirst)$ twurl accounts d@cloudshell:~ (hashtag-voicefirst)$ twurl /1.1/statuses/home_timeline.json

I think this is a GCS thing, not a twurl issue.

When I installed twurl on my Google Cloud Shell instance, it turned out that the .gems/bin directory was not on my PATH, so I simply appended it to the PATH variable, and now I'm able to reliably execute twurl commands.

Andy

Thank you for the helpful reply.

I've dug into this further, and it turns out Cloud Shell installations are only temporary, and that's why it initially worked, but later I was getting 'command not found' on return visit attempts at twurl commands.

Google suggested that I do this through their Compute Engine, so I've set up a Virtual Machine there.

Do you have any information or instructions on working with Google's Compute Engine to install Twurl or use curl, get OAUTH verification, and make calls to the Twitter API? I'm familiar with the process for Cloud Shell, but not Compute Engine, and haven't been able to find anything on the Twitter support site or GitHub.

I'm assuming I'd be using an HTTP Get request?

Thanks for any input
doug

Meant to add, I'm hoping to do this with JavaScript.

Looks like this is no longer an open issue, closing.