Twitter auth from command line

Morning,

I have an idea for a twitter feed, show instances of head shots on my
counter strike source server (http://colo.doghousedean.com)

Since i last did twitter from command line you could use curl command but
now i get “Basic authentication not supported”

Has any one done this recently, I’m coding in
BaConhttp://www.basic-converter.orgit converts basic to C and can
import libraries (liboauth) but I have no
clue where to start.

I would appreciate any help on offer.

Cheers

Morning,

I have an idea for a twitter feed, show instances of head shots on my
counter strike source server (http://colo.doghousedean.com)

Since i last did twitter from command line you could use curl command but
now i get “Basic authentication not supported”

Has any one done this recently, I’m coding in BaCon it converts basic to C
and can import libraries (liboauth) but I have no clue where to start.

I would appreciate any help on offer.

Twitter’s not so keen on basic auth any more, you have to use oauth.
I’ve written quite a few clients against twitter, but not using Basic
or C, if I point you at one of my libraries for doing this perhaps
you’ll be able to work backwards ?

[1] - A lib of mine for interacting with OAuth from Node.js
(Javascript on the server) http://github.com/ciaranj/node-oauth
[2] - A page showing example usage for sending a 'tweet’
http://github.com/ciaranj/node-oauth/wiki/Example-usage-example-for-Tweeting-with-Twitter

I hope this helps a little ? In basic terms to get started with
OAuth, you need to register your ‘app’ with twitter (this takes 30
seconds) and gives you both a key and a shared secret.

In your particular case you’ll not be wanting to use the standard
3-legged OAuth, but use a pre-canned Access Token + Access Token
secret, which can be found by hunting around the dev.twitter.com site
after registering your app (‘My Access Token’) … I can never remember
where it is, or I’d tell you more explicitly.

Once you have the shared secret, the key, the token and the token
secret you’re good to go . You throw all these parameters at an
OAuth library that can ‘sign’ urls (take those parameters, concatenate
them with the HTTP method, url and parameters, generate a hash etc.)
using this ‘signed’ url you should be able to access the resource
you’re interested in, or in your case POST a tweet

Cheery-bye
-cj.

As another alternative to Ciaran’s route, let me bang the StatusNet Drum :slight_smile:

StatusNet have not disabled their Basic Authentication method, and can
bridge into Twitter (depending on how the bridge is set up, this can
include push or push-and-pull bridging).

The reference implementation of StatusNet is at http://identi.ca
(where you can only push into Twitter) while you can also register at
http://status.net for an account there (to get push-and-pull
bridging). Or, you can set your own instance up (like I have at
http://jon.sprig.gs).

All the best,
Jon “The Nice Guy” SpriggsOn 14 October 2010 08:26, Dean Moore doghousedean@gmail.com wrote:

Morning,

I have an idea for a twitter feed, show instances of head shots on my
counter strike source server (http://colo.doghousedean.com)

Since i last did twitter from command line you could use curl command but
now i get “Basic authentication not supported”

Has any one done this recently, I’m coding in BaCon it converts basic to C
and can import libraries (liboauth) but I have no clue where to start.

I would appreciate any help on offer.

Cheers


You received this message because you are subscribed to the Google Groups
"HACMan" group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to
hacman+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/hacman?hl=en-GB.

I believe StatusNet can use OAuth, and I would recommend you do use
this instead of Basic Auth as it avoids sending your credentials in
the plain anywhere (or is the basic auth over SSL) ?

(But yeah, my instructions still hold true for either StatusNet or Twitter)
-cj.On Thu, Oct 14, 2010 at 9:04 AM, Jon Spriggs jon@sprig.gs wrote:

As another alternative to Ciaran’s route, let me bang the StatusNet Drum :slight_smile:

StatusNet have not disabled their Basic Authentication method, and can
bridge into Twitter (depending on how the bridge is set up, this can
include push or push-and-pull bridging).

The reference implementation of StatusNet is at http://identi.ca
(where you can only push into Twitter) while you can also register at
http://status.net for an account there (to get push-and-pull
bridging). Or, you can set your own instance up (like I have at
http://jon.sprig.gs).

All the best,

Jon “The Nice Guy” Spriggs

On 14 October 2010 08:26, Dean Moore doghousedean@gmail.com wrote:

Morning,

I have an idea for a twitter feed, show instances of head shots on my
counter strike source server (http://colo.doghousedean.com)

Since i last did twitter from command line you could use curl command but
now i get “Basic authentication not supported”

Has any one done this recently, I’m coding in BaCon it converts basic to C
and can import libraries (liboauth) but I have no clue where to start.

I would appreciate any help on offer.

Cheers


You received this message because you are subscribed to the Google Groups
"HACMan" group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to
hacman+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/hacman?hl=en-GB.


You received this message because you are subscribed to the Google Groups “HACMan” group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to hacman+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hacman?hl=en-GB.

wow thanks guys, I will give both options a whirl.On 14 October 2010 09:07, Ciaran ciaranj@gmail.com wrote:

I believe StatusNet can use OAuth, and I would recommend you do use
this instead of Basic Auth as it avoids sending your credentials in
the plain anywhere (or is the basic auth over SSL) ?

(But yeah, my instructions still hold true for either StatusNet or Twitter)
-cj.

On Thu, Oct 14, 2010 at 9:04 AM, Jon Spriggs jon@sprig.gs wrote:

As another alternative to Ciaran’s route, let me bang the StatusNet Drum
:slight_smile:

StatusNet have not disabled their Basic Authentication method, and can
bridge into Twitter (depending on how the bridge is set up, this can
include push or push-and-pull bridging).

The reference implementation of StatusNet is at http://identi.ca
(where you can only push into Twitter) while you can also register at
http://status.net for an account there (to get push-and-pull
bridging). Or, you can set your own instance up (like I have at
http://jon.sprig.gs).

All the best,

Jon “The Nice Guy” Spriggs

On 14 October 2010 08:26, Dean Moore doghousedean@gmail.com wrote:

Morning,

I have an idea for a twitter feed, show instances of head shots on my
counter strike source server (http://colo.doghousedean.com)

Since i last did twitter from command line you could use curl command
but

now i get “Basic authentication not supported”

Has any one done this recently, I’m coding in BaCon it converts basic to
C

and can import libraries (liboauth) but I have no clue where to start.

I would appreciate any help on offer.

Cheers


You received this message because you are subscribed to the Google
Groups

“HACMan” group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to
hacman+unsubscribe@googlegroups.comhacman%2Bunsubscribe@googlegroups.com
.

For more options, visit this group at
http://groups.google.com/group/hacman?hl=en-GB.


You received this message because you are subscribed to the Google Groups
"HACMan" group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to
hacman+unsubscribe@googlegroups.comhacman%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/hacman?hl=en-GB.


You received this message because you are subscribed to the Google Groups
"HACMan" group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to
hacman+unsubscribe@googlegroups.comhacman%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/hacman?hl=en-GB.

StatusNet will do OAuth, and, if your instance supports SSL (both at
status.net and identi.ca do), then you can use SSL with BasicAuth

All the best
Jon “The Nice Guy” SpriggsOn 14 October 2010 09:07, Ciaran ciaranj@gmail.com wrote:

I believe StatusNet can use OAuth, and I would recommend you do use
this instead of Basic Auth as it avoids sending your credentials in
the plain anywhere (or is the basic auth over SSL) ?

(But yeah, my instructions still hold true for either StatusNet or Twitter)
-cj.

On Thu, Oct 14, 2010 at 9:04 AM, Jon Spriggs jon@sprig.gs wrote:

As another alternative to Ciaran’s route, let me bang the StatusNet Drum :slight_smile:

StatusNet have not disabled their Basic Authentication method, and can
bridge into Twitter (depending on how the bridge is set up, this can
include push or push-and-pull bridging).

The reference implementation of StatusNet is at http://identi.ca
(where you can only push into Twitter) while you can also register at
http://status.net for an account there (to get push-and-pull
bridging). Or, you can set your own instance up (like I have at
http://jon.sprig.gs).

All the best,

Jon “The Nice Guy” Spriggs

On 14 October 2010 08:26, Dean Moore doghousedean@gmail.com wrote:

Morning,

I have an idea for a twitter feed, show instances of head shots on my
counter strike source server (http://colo.doghousedean.com)

Since i last did twitter from command line you could use curl command but
now i get “Basic authentication not supported”

Has any one done this recently, I’m coding in BaCon it converts basic to C
and can import libraries (liboauth) but I have no clue where to start.

I would appreciate any help on offer.

Cheers


You received this message because you are subscribed to the Google Groups
"HACMan" group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to
hacman+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/hacman?hl=en-GB.


You received this message because you are subscribed to the Google Groups “HACMan” group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to hacman+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hacman?hl=en-GB.


You received this message because you are subscribed to the Google Groups “HACMan” group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to hacman+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hacman?hl=en-GB.

StatusNet will do OAuth, and, if your instance supports SSL (both at
status.net and identi.ca do), then you can use SSL with BasicAuth
I guess SSL has the edge in that your traffic will be protected, but
given we’re talking about ‘tweets’ here which are generally pretty
public that may not be much of an issue :wink: … OAuth is a royal PiTA,
having written 1.0, 1.0A and 2 consumers and providers, and have an
outstanding support request with Twitter desperately trying to explain
that their interpretation of the specs is ‘wrong’ (different) I can
understand a reticence to use it
-cj.

Having a good look round status.net and looking for the url to post to i
stumbled accross a little ruby gem called Twurl, its basically curl for
twitter oauth.

after some configuration of my centos server (old version of ruby) it works
a treat.

you can find Twurl at
http://thechangelog.com/post/536535280/twurl-oauth-enabled-curl-for-the-twitter-api
and also http://twitter.com/#!/cssheadshot
http://twitter.com/#!/cssheadshot

Now i need to find an efficient way to log the headshots without causing
duplicates and we will be rocking

Cheers guysOn 14 October 2010 10:20, Ciaran ciaranj@gmail.com wrote:

On Thu, Oct 14, 2010 at 10:12 AM, Jon Spriggs jon@sprig.gs wrote:

StatusNet will do OAuth, and, if your instance supports SSL (both at
status.net and identi.ca do), then you can use SSL with BasicAuth
I guess SSL has the edge in that your traffic will be protected, but
given we’re talking about ‘tweets’ here which are generally pretty
public that may not be much of an issue :wink: … OAuth is a royal PiTA,
having written 1.0, 1.0A and 2 consumers and providers, and have an
outstanding support request with Twitter desperately trying to explain
that their interpretation of the specs is ‘wrong’ (different) I can
understand a reticence to use it
-cj.


You received this message because you are subscribed to the Google Groups
"HACMan" group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to
hacman+unsubscribe@googlegroups.comhacman%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/hacman?hl=en-GB.

I managed to finally get it all working together.

With a combination of Twurl - OAuth-enabled curl for the Twitter
APIhttp://thechangelog.com/post/536535280/twurl-oauth-enabled-curl-for-the-twitter-api
and http://www.basic-converter.org I was able to code it to tweet.

http://twitter.com/#!/cssheadshot http://twitter.com/#!/cssheadshot

Now i just need to play the odd game and get some entries.

Cheers for the pointers guys.

Have fun with Robots to day, im working, seems i always have to work when
something interesting is going on :(On 14 October 2010 11:45, Dean Moore doghousedean@gmail.com wrote:

Having a good look round status.net and looking for the url to post to i
stumbled accross a little ruby gem called Twurl, its basically curl for
twitter oauth.

after some configuration of my centos server (old version of ruby) it works
a treat.

you can find Twurl at
http://thechangelog.com/post/536535280/twurl-oauth-enabled-curl-for-the-twitter-api
and also http://twitter.com/#!/cssheadshot
http://twitter.com/#!/cssheadshot

Now i need to find an efficient way to log the headshots without causing
duplicates and we will be rocking

Cheers guys

On 14 October 2010 10:20, Ciaran ciaranj@gmail.com wrote:

On Thu, Oct 14, 2010 at 10:12 AM, Jon Spriggs jon@sprig.gs wrote:

StatusNet will do OAuth, and, if your instance supports SSL (both at
status.net and identi.ca do), then you can use SSL with BasicAuth
I guess SSL has the edge in that your traffic will be protected, but
given we’re talking about ‘tweets’ here which are generally pretty
public that may not be much of an issue :wink: … OAuth is a royal PiTA,
having written 1.0, 1.0A and 2 consumers and providers, and have an
outstanding support request with Twitter desperately trying to explain
that their interpretation of the specs is ‘wrong’ (different) I can
understand a reticence to use it
-cj.


You received this message because you are subscribed to the Google Groups
"HACMan" group.
To post to this group, send an email to hacman@googlegroups.com.
To unsubscribe from this group, send email to
hacman+unsubscribe@googlegroups.comhacman%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/hacman?hl=en-GB.