• Twitter Posting

    From solaris@21:1/102 to All on Wednesday, November 02, 2016 12:48:00
    anybody have / willing to share the twitter post mod, wonder if its mpl-able

    |05..-(|03 Sola|08ris|05 )..--
    |07Always at |03my PC double cl|08ick'n on my mizouse !

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: Error 404 BBS (21:1/102)
  • From outsoft@21:1/173 to solaris on Wednesday, November 02, 2016 19:26:00
    A twitter mod for let Mystic send messages on Twitter or only log on Twitter? ;)



    --Simon

    --- Mystic BBS v1.12 A31 (Linux)
    * Origin: Sinclair Retro BBS (21:1/173)
  • From Avon@21:1/179 to solaris on Thursday, November 03, 2016 07:33:00
    On 11/02/16, solaris said the following...

    anybody have / willing to share the twitter post mod, wonder if its mpl-able

    I think this has been posted before but I'd need to go back and check :)

    Best, Paul

    --- Mystic BBS v1.12 A31 (Raspberry Pi)
    * Origin: Cryptogenic Radix (21:1/179)
  • From solaris@21:1/102 to outsoft on Wednesday, November 02, 2016 21:30:00
    A twitter mod for let Mystic send messages on Twitter or only log on Twitter? ;)

    I'm look'n for the log on/off post / user post to twitter mod like the one
    used at dogtown

    |05..-(|03 Sola|08ris|05 )..--
    |07Always at |03my PC double cl|08ick'n on my mizouse !

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: Error 404 BBS (21:1/102)
  • From Captain Obvious@21:1/157 to solaris on Thursday, November 03, 2016 05:25:00
    On 11/02/16, solaris said the following...

    I'm look'n for the log on/off post / user post to twitter mod like the
    one used at dogtown

    I'm using it at logon for mine as well. I think most of us are just using cobbled together python scripts.

    Mine runs during the prelogin menu as a Mytic Python Module. Here's the logintweet.mpy that I am using. You'll need to set up a Twitter App and populate the keys below with your own info.


    ##############################################################
    ## INITIALIZE BBS FUNCTIONS AND DEFINE ANY GLOBAL VARIABLES ## ##############################################################
    import tweepy
    import sys
    import datetime
    from mystic_bbs import *
    # Consumer keys and access tokens, used for OAuth
    consumer_key = ''
    consumer_secret = ''
    access_token = ''
    access_token_secret = ''


    # OAuth process, using the keys and tokens
    auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret)
    thisuser = getuser(0); # read the currently logged in user into thisuser
    # Creation of the actual interface, using authentication
    writeln("Please Hold On....Updating Shadowscope Twitter Status!");
    api = tweepy.API(auth)

    tweet_text = thisuser["handle"] + " logged into Shadowscope BBS at " + datetime.datetime.strftime(datetime.datetime.now(), '%I:%H:%M%p') api.update_status(status=tweet_text)

    Hopefully it will display properly in here. Besides removing my Keys I also removed some of the formatting pipe codes from the writeln statement.

    -=>Richard Miles<=-
    -=>Captain Obvious<=-
    -=>bbs.shadowscope.com<=-

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: Shadowscope BBS | bbs.shadowscope.com | Temple, GA (21:1/157)
  • From Indrid Cold@21:1/165 to Captain Obvious on Thursday, November 03, 2016 11:37:00
    I'm using it at logon for mine as well. I think most of us are just using cobbled together python scripts.

    I'm simply using little BASH scripts to monitor NODEx.LOG and send tweets on status triggering - to interface Twitter APIs to shell I've found twurl,
    after tokens validation. Do you get my posts? I've the doubt, since a little time...

    ¯¯ Indrid Cold ®®

    "What do you look like?"
    "It depends on who is looking."

    --- Mystic BBS v1.12 A31 (Raspberry Pi)
    * Origin: Miskatonic BBS | telnet://rasppi.servebbs.org (21:1/165)
  • From solaris@21:1/102 to Captain Obvious on Friday, November 04, 2016 00:41:00
    ok got all my keys set, but the script is not working , I think my oauth is failing , do you use a return url ?. When using the test oauth feature on the twitter dev it says " sorry that page does not exist "
    thanks

    |05..-(|03 Sola|08ris|05 )..--
    |07Always at |03my PC double cl|08ick'n on my mizouse !

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: Error 404 BBS (21:1/102)
  • From Captain Obvious@21:1/157 to solaris on Friday, November 04, 2016 15:40:00
    On 11/04/16, solaris said the following...

    ok got all my keys set, but the script is not working , I think my oauth is failing , do you use a return url ?. When using the test oauth


    No, no callback url. Have you tested it from the commandline just using
    python rather than throwing mystic into the mix? That's what I had to do
    first just to make sure it was working properly.

    -=>Richard Miles<=-
    -=>Captain Obvious<=-
    -=>bbs.shadowscope.com<=-

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: Shadowscope BBS | bbs.shadowscope.com | Temple, GA (21:1/157)
  • From solaris@21:1/102 to Captain Obvious on Saturday, November 05, 2016 20:16:00
    ok, im getting an error that states
    "importerror: no module named mystic_bbs"

    |05..-(|03 Sola|08ris|05 )..--
    |07Always at |03my PC double cl|08ick'n on my mizouse !

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: Error 404 BBS (21:1/102)
  • From Captain Obvious@21:1/157 to solaris on Sunday, November 06, 2016 09:50:00
    On 11/05/16, solaris said the following...

    ok, im getting an error that states
    "importerror: no module named mystic_bbs"


    Is that running it as a .py from the commandline or running the .mpy from the BBS?

    If you just want to run to test from the commandline try this one:

    import tweepy
    import sys

    # Consumer keys and access tokens, used for OAuth
    consumer_key = 'CONSUMEERKEY'
    consumer_secret = 'CONSUMERSECRET'
    access_token = 'ACCESSTOKEN'
    access_token_secret = 'ACCESSSECRET'

    # OAuth process, using the keys and tokens
    auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret)

    # Creation of the actual interface, using authentication
    api = tweepy.API(auth)

    if len(sys.argv) >= 2:
    tweet_text = sys.argv[1]

    else:
    tweet_text = "Still messing about with tweepy and twitter API. :)"

    if len(tweet_text) <= 140:
    api.update_status(status=tweet_text)
    else:
    print "tweet not sent. Too long. 140 chars Max."

    Not sure if I left it all out or not. Just got home from the hospital and am pretty loopy on pain medication. Just looking through my hard drive I believe that was my initial test prior to using it in Mystic.

    -=>Richard Miles<=-
    -=>Captain Obvious<=-
    -=>bbs.shadowscope.com<=-

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: Shadowscope BBS | bbs.shadowscope.com | Temple, GA (21:1/157)
  • From solaris@21:1/102 to Captain Obvious on Tuesday, November 08, 2016 15:09:00
    "importerror: no module named mystic_bbs"
    Is that running it as a .py from the commandline or running the .mpy
    from the BBS?
    If you just want to run to test from the commandline try this one:

    ok that error was from the command prompt, I ran the test script you gave me and if you didn't see it w.....it worked great...

    however the main script still gives me the import error so ......

    1: What is the import mystic_bbs string trying to point to
    2: what does your mystic command line look like

    thanks

    |05..-(|03 Sola|08ris|05 )..--
    |07Always at |03my PC double cl|08ick'n on my mizouse !

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: Error 404 BBS (21:1/102)