Results 1 to 14 of 14
  1. #1
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed

    [Share]Twitter VB[Dll Wrapper]


    Twitter VB

    Definition: A "wrapper" is essentially a chunk of code (class, dll, etc.) that you will be able to download, drop into your project, and be pretty much ready to go quickly and efficiently . These "wrappers" will handle all the details of the connections, parameters, and interface for you so that you can focus on just using the object(s).

    this is for anyone looking to increase their skills and if your bored, If you feel like developing a Desktop Widget, A App, Or a notification service. This is a Twitter API .net Dll Wrapper. Essentially it allows you to use Twitter API without having to lay down any of the annoying (sometimes time consuming) ground work {which for twitter can be annoying especially now that authorization using OAuth is all that is excepted when creating desktop or web applications}, Simply add the .dll as a reference, and create your application using the API

    What You Need.

    1. A Twitter API Key
    Click Here

    2. Visual Basic (or studio if using with C#, Web Developer, etc)

    3. The .dll attachment located in this thread

    Once you have registered your application and receive your Secret Keys you can begin creating your project.

    Among a-lot of other things Twitter VB has

    A implementation of OAuth for desktop and web applications. (Which is now the only acceptable way to access twitter from a 3rd party app)
    Supports Twitter's new "retweet" and "list" functions.
    Can upload photos to TwicPic and TweetPhoto.
    Provides access to Url shorteners.
    100% .NET code, implemented to be compatible with version 2.0 or higher of the .NET Framework. \
    it can be used with any .NET-compliant language (C#, C, Delphi, etc).

    Here is a quick tutorial(ish), Quickly made a small project to display how to use it.

    After adding the dll as a reference

    Code:
    Imports TwitterVB2
    Imports TwitterAPIException
    'TwitterAPIException is used to display the error TwitterAPI is displaying (as opposed to a general error from your application ,

    Code:
    Try 
    'Code
    Catch Ex as TwitterAPIException
    'display error 
    end try
    Importing Twittervb2 gives you full access to the wrapper, You may see twitter, but that is outdated and uses normal login features which is no longer accepted.

    At this point you will have intellisense to guide you. However that API Requires your "Secrets" to gain access to the Twitter API.

    First we need to ask the user permission for this app to use their account

    Code:
    Public TwLog as New TwitterAPI
    
    'On button click event or form load event 
    'This will generate a unigue url for the user to use your registered application
    Dim AuthUrl As String = tw.GetAuthorizationLink(ConsumerKey, ConsumerKeySecret)
    Note: Both ConsumerKey and ConsumerKeySecret are provided by twitter to your development account, don't share this information with anyone as it is used to identify you as a (twitter app) developer as much as it is to gain access to the API.


    Once you have a generated URL (which you never need to know, Unless you have some development issues, then maybe you can create a admin part to the application for debugging where all twitter API generated info is stored , like a database for debugging)

    Use the URL either in a 3rd party browser or in a browser in your application (or if your not lazy like me, user some parsing to grab the information and cleanly add it to the application)

    Code:
     
    Webbrowser1.navigate(AuthUrl)
    The user will then be asked to login and authorize the application.

    Here are some screenshots of the process

    Login from in app webbrowser

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/twitter1.jpg[/IMG]

    Authorization screen

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/twitter2.jpg[/IMG]

    Now we need to verify the pin is correct
    "Ask Twitter to confirm"
    'Allow the user to enter the pin number.

    Code:
    Dim Validate As Boolean = TwLog.ValidatePIN(Textbox1.text)
    If it is valid then

    Code:
    If Validate Then 
         Dim OAuthToken as String = tw.OAuth_Token()
         Dim OAuthTokenSecret as String = tw.OAuth_TokenSecret()
    End If
    OauthToken and OauthTokenSecet is generated by Twitter API , so we will just pass the information without knowing it.

    That's pretty much it.

    To update status use

    Code:
    TwLog.AuthenticateWith(ConsumerKey,ConsumerKeySecret,OAuthToken,OAuthTokenSecret) 
    TwLog.Update(Textbox2.text)
    remember you must hardcode your consumerkey and consumerkeysecret, Oauthtoken and Oauthtokensecret are handled "on the fly" so you can leave them as they are.


    'Again you can really just parse the information and make this all automatic, just really to lazy.


    Get Tweets from homepage

    Code:
    twlog.AuthenticateWith("consumerkey","consumersecret","oauthtoken","tokensecret")
    For Each tweet As TwitterStatus In twlog.HomeTimeline()
    ' then pass the information to a listbox or similar
    Next
    for photos you will need a API for either https://twitpic.com/ or https://plixi.com/

    Plus the user is required to login from your app because username and password will be required.

    Code:
    twlog.AuthenticateWith("consumerkey","consumersecret","oauthtoken","oauthtokensecret")
    twlog.TweetPhotoUpload("C:\filelocation\Image.jpg", textbox1.text, Username.text, Password.Text", "tweet photo API key")

    If you would like to user to be able to read direct messages.

    Code:
    twlog.AuthenticateWith("consumerkey","consumersecret","oauthtoken","oauthtokensecret")
    For Each message As TwitterDirectMessage In twlog.DirectMessages
    'then pass the data to a listbox or something (message.SenderScreenName & " : " & message.Text)
    Send a message to a specific account (direct message a user)

    Code:
    twlog.AuthenticateWith("consumerkey","consumersecret","oauthtoken","tokensecret")
    twlog.SendDirectMessage("Twitter UserName to message", "Your Message")
    Read a specific users tweets.

    Code:
    twlog.AuthenticateWith("consumerkey","consumersecret","oauthtoken","oauthtokensecret")
    For Each tweet As TwitterStatus In twlog.UserTimeline("Twitter UserName")
    'Pass the information to a listbox or whatever (tweet.User.ScreenName & " : " & tweet.Text)
    Hope this helps, Have Fun.

    'This wrapper is part of the twittervb project over at codeplex.
    ____________________________

    Virus Scan Of Attached File

    VirusTotal - Free Online Virus, Malware and URL Scanner

    https://virusscan.jotti.org/en/scanre...2c35fad8934fed
    Last edited by NextGen1; 09-20-2010 at 05:15 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  2. The Following 5 Users Say Thank You to NextGen1 For This Useful Post:

    Cakson_Gokil (05-07-2013),Jason (09-27-2010),JJOhio (06-29-2013),lifka (05-22-2013),sananelan1 (06-09-2013)

  3. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Noob release, didn't expect anything better from you.



  4. #3
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by Blubb1337 View Post
    Noob release, didn't expect anything better from you.
    Trollllllllll, Your waiting for the download noob


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. #4
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    *Sigh* Noob, can't you even rename the buttons ? -.-
    @Release: Nice one !! /yea

  6. #5
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    I'm to lazy, I am the one who wrote the whole article on naming components . No offense, think I really have the time (for demonstration) to "label" the buttons (could have changed names, labeling is different Noob )

    However, Everyone use it, you know you want to ., Make some uber duper super release and credit it to yourself.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  7. #6
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Sure lazy....you simply DON'T KNOW how to rename buttons choob



  8. The Following User Says Thank You to Blubb1337 For This Useful Post:

    NextGen1 (09-20-2010)

  9. #7
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by Blubb1337 View Post
    Sure lazy....you simply DON'T KNOW how to rename buttons choob
    Lol, maybe we should write a tutorial for him

    @NG: I have no idea on what type of releases to make from it ! Ideas x_x

  10. #8
    iFrank1's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    164
    Reputation
    9
    Thanks
    14
    My Mood
    Angelic
    @ off topic how u make the buttens so good same color???
    Press thanks if i helped isnt that right kitty /?

  11. #9
    mizzer3's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    MPGH.net
    Posts
    888
    Reputation
    7
    Thanks
    171
    My Mood
    Sleepy
    nice maN i, would never find this out xD
    Heal Ur Allies, And You Will Win The War.



    RESPECT LIST :

    - Very Good Friend - Sn0wn00b
    - All the Mpgh minions ( special m3 )
    - th3reaper
    - respeckt52
    - s3liskar
    - thecamels8

  12. #10
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by Blubb1337 View Post
    Sure lazy....you simply DON'T KNOW how to rename buttons choob
    Code:
    SudoChangeButtonOnFlyByNoobSystem.ChangeNow.OkayNow.Now.!!!
    ???

    or no?

    @ Xscape - If I where you I would write a complex full featured Twitter Desktop application with Task bar notifications, Then release it as a free application to brother soft or Cnet with a link to your website (in the application), helps build popularity.

    Consumers eat up free applications (especially when they are full featured)

    This really goes for anyone.

    Plus , As long as your application is registered, then whenever a user posts a tweet form your application, it will add a "Tweet by YourapplicationName" tag under the tweets. As far as advertising goes, it's a great opportunity.



    @ Ifrank, You can do this yourself with some manipulation, but why? That was DevComponents.




    Last edited by NextGen1; 09-20-2010 at 05:15 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  13. The Following User Says Thank You to NextGen1 For This Useful Post:

    Hassan (09-24-2010)

  14. #11
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    I don't rename buttons.

    Might have a try at this. /

  15. #12
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by lolland View Post
    I don't rename buttons.

    Might have a try at this. /
    You should, It will make a great addition to your other applications over at your site.

    Plus, Anyone inteested in this, may be happy to know, that you can find .Net wrappers for a lot of API's Including, Splunk, Yahoo, Sqlite (which EVERYONE should use when working with storage, it is light and acceptable on mobile/portable devices {most}), Mail Chimp, Virtual Earth, OpenGL, Crystal Consulting etc. etc. etc. ,


    Last edited by NextGen1; 09-20-2010 at 03:44 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  16. #13
    seeplusplus's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Massachusetts
    Posts
    329
    Reputation
    8
    Thanks
    85
    Wow. Did not know there was a Twitter API. Thanks, now I can track a ip from someone who is posting shit!

  17. #14
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Almost all major internet based companies have api's now. Just some require more work then others. And some are almost impossible to use.


     


     


     



    The Most complete application MPGH will ever offer - 68%




Similar Threads

  1. Morphine.dll + Injec-Tor + Tutorial
    By Papaya in forum Gunz Hacks
    Replies: 21
    Last Post: 10-20-2010, 05:07 PM
  2. .dll injector
    By EleMentX in forum Gunz General
    Replies: 31
    Last Post: 07-08-2010, 10:44 AM
  3. [Help] Injector + Dll Wrapper
    By Tierrize in forum Visual Basic Programming
    Replies: 3
    Last Post: 10-27-2009, 08:56 PM
  4. dll for those who cant even google :P
    By jam in forum Gunz Hacks
    Replies: 5
    Last Post: 06-07-2007, 03:32 AM
  5. DLL injection Failled
    By aynal in forum WarRock - International Hacks
    Replies: 1
    Last Post: 01-15-2006, 09:41 PM