Created
April 11, 2011 18:56
-
-
Save MikeWills/914056 to your computer and use it in GitHub Desktop.
Send a Tweet using an old method. This code may not work anymore. Documented on [the midrange.com wiki](http://wiki.midrange.com/index.php/SNDTWTMSG)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PGM PARM(&USER &PASS &TWEET) | |
DCL VAR(&USER) TYPE(*CHAR) LEN(30) | |
DCL VAR(&PASS) TYPE(*CHAR) LEN(30) | |
DCL VAR(&TWEET) TYPE(*CHAR) LEN(140) | |
DCL VAR(&CMD) TYPE(*CHAR) LEN(300) | |
CHGVAR VAR(&CMD) VALUE('/installedApps/curl/curl --basic + | |
--user ' || &USER *TCAT ':' || &PASS *TCAT ' + | |
--data status="' || &TWEET *TCAT '" + | |
http://twitter.com/statuses/update.xml') | |
QSH CMD(&CMD) | |
ENDPGM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CMD PROMPT('Send Tweet') | |
PARM KWD(USER) TYPE(*CHAR) LEN(30) CASE(*MIXED) + | |
PROMPT('User Name') | |
PARM KWD(PASS) TYPE(*CHAR) LEN(30) CASE(*MIXED) + | |
DSPINPUT(*NO) PROMPT('Password') | |
PARM KWD(TWEET) TYPE(*CHAR) LEN(140) CASE(*MIXED) + | |
PROMPT('Tweet') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment