Howto use one instance of tcli for multiple Twitter accounts

This documentation details how to allow one instance of tcli (OAuth) to be used for multiple user accounts,

open tcli.sh (you can grab a modified version here) in a text editor and change the line

      
    source .tcli.rc to
        source "$TCLICONFIG"    


Pass the path to the appropriate .tcli.rc when calling the program;
        
    TCLICONFIG="/home/ben/OAuthprog1/USER1CONFIG/.tcli.rc" \
    ./tcli.rc -c statuses -s "tcli.sh rocks!"

Note: Remember to cd into the directory containing the Twitter Module. If for some reason you can not/would prefer not to do this every time. You can use a similar method to define the path to the programs;
Locate the line;
        source TwitterOAuth.sh    
and change to
    source "$OAUTH_PATH"/TwitterOAuth.sh    
Then open TwitterOAuth.sh and locate the line
        source OAuth.sh    
and change to
        source "$OAUTH_PATH"/OAuth.sh    
Then when calling tcli.sh simply pass the variable OAUTH_PATH;
        OAUTH_PATH="/path/to/OAuth" TCLICONFIG="/home/ben/OAuthprog1/USER1CONFIG/.tcli.rc" \
    ./tcli.rc -c statuses -s "tcli.sh rocks!"


Happy Coding!

 
 Share