Announcement

Collapse
No announcement yet.

Update twitter status

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Update twitter status

    i wrote pb code to update twitter status. the code can be downloaded from http://www.greatwebdivide.com in the "code" area.

    the source has a bunch of files in it because i reuse common libraries. all of my common libraries have been included so you can compile it. the cmdtwit.bas file is the main one. its a relatively short and simple program. i haven't tested it extensively, but it seems to work ok on my twitter account.

    best regards,
    don
    Don Dickinson
    www.greatwebdivide.com

  • #2
    oh, i should mention that the code compiles with pbcc 3.x. maybe it will compile with newer versions, maybe not. i may have some non-byval pointers in the library files - just add byval in front of them and it will probably work. i haven't upgraded to pbcc5, but i think i'm going to order it now

    sample usage:
    Code:
    cmdtwit.exe /account="my account" /password="my password" /status="this is my status" /save
    the "save" parameter tells the system to encrypt the password and save it in the cmdtwit.ini file. it also saves the last account you used, so you can do this next time:
    Code:
    cmdtwit.exe /status="This is my status"
    and it will recall the account and password from the cmdtwit.ini file

    of course, since i've given away the source and the password algorithm is two-way, the encryption is meaningless unless you recompile with a new encryption key (see the $ENC_PASSWORD constant in cmdtwit.bas)

    -don
    Don Dickinson
    Member
    Last edited by Don Dickinson; 14 Jul 2009, 11:02 PM.
    Don Dickinson
    www.greatwebdivide.com

    Comment


    • #3
      I've changed all of the PTR with BYVAL but can't compile. Get an Error 161 with the following function

      Code:
      '  Returns the ip address of the given host in big endian form
      '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      function ipGetAddress alias "ipGetAddress" _
            ( ByVal sHostName as String ) export as Long
      
         Dim ptrHost As hostentStru Ptr
      
         if ipIsDotted(sHostName) then
            function = dottedToIP(sHostName)
         else
            ptrHost = gethostbyname(sHostName + $nul)
            If ptrHost Then
               Function = @[email protected]@h_list
            Else
               Function = 0
            End If
         end if
      
      End Function

      Comment


      • #4
        > but can't compile. Get an Error 161 with the following function...

        I don't see a compile time error 161. Matter of fact, '161' is out of range for a compile time error - it's in the runtime error range.

        Maybe you could cut and paste the log? (you can do that right from the IDE, just right-click on the output panel).

        However.... (stab in the dark)...
        Code:
        Dim ptrHost As hostentStru Ptr
        Check the definition of this structure as defined in whatever you are using. A bunch of those structures with "PTR" members have been changed over the years.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Old Fashioned

          I'm old fashioned. What is "twitter?"
          Walt Decker

          Comment


          • #6
            http://twitter.com/ and http://en.wikipedia.org/wiki/Twitter

            You should be able to figure things out from there; basically it's a microblog where people can post updates about various things (some serious, some completely inane).
            Mike Stefanik
            sockettools.com

            Comment

            Working...
            X