twitter client with api
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
9 posts
Page 1 of 1
first download the twitter dll
here: Then follow my step
add 4 textbox
name
txtCostumerKey
txtCostumerKeySecret
txtToken
txtTokenSecret
add 1 textbox name txtStatus
add 1 richtextbox name txtTweets , readonly true
add one button name btnTweet
add one label text: What's happening?
save your project
then open My Project, in compile, click Advance Compile Options...
then change the .Net frame work to .Net Framework 3.5
codes:
before public class add
sign in your twitter, then go to https://dev.twitter.com/apps/new . Then Register your application.
here: Then follow my step
add 4 textbox
name
txtCostumerKey
txtCostumerKeySecret
txtToken
txtTokenSecret
add 1 textbox name txtStatus
add 1 richtextbox name txtTweets , readonly true
add one button name btnTweet
add one label text: What's happening?
save your project
then open My Project, in compile, click Advance Compile Options...
then change the .Net frame work to .Net Framework 3.5
codes:
before public class add
Code: Select all
after public class add
Imports TwitterVB2
Code: Select all
form load:
Dim twitter As New TwitterAPI
Code: Select all
btnTweet code:
twitter.AuthenticateWith(txtCostumerKey.Text, txtCostumerKeySecret.Text, txtToken.Text, txtTokenSecret.Text)
For Each tweet As TwitterStatus In twitter.HomeTimeline
txtTweets.AppendText(tweet.User.ScreenName + vbNewLine + tweet.Text + vbNewLine + vbNewLine)
Next
Me.Text = twitter.AccountInformation.ScreenName
Code: Select all
txtStatus code:
Dim TweetStatus As TwitterStatus = twitter.Update(txtStatus.Text)
MsgBox("Tweet successfully")
txtStatus.Text = ""
Code: Select all
Now how to get txtCostumerKey, CostumerKeySecret,Token, TokenSecret?If txtStatus.Text = "" Then
btnTweet.Enabled = False
Else
btnTweet.Enabled = True
End If
sign in your twitter, then go to https://dev.twitter.com/apps/new . Then Register your application.
You do not have the required permissions to view the files attached to this post.
When I debug app it showes me this:
Code: Select all
TwitterAPIException was unhandled
AuthType=OAUTH
Message=Exception of type 'TwitterAPIException' was thrown.
Method=POST
Source=TwitterVB
Url=http://api.twitter.com/1/statuses/update.xml
StackTrace:
at TwitterVB2.TwitterOAuth.WebRequest(Method RequestMethod, String Url, String PostData)
at TwitterVB2.TwitterOAuth.OAuthWebRequest(Method RequestMethod, String url, String PostData)
at TwitterVB2.TwitterAPI.PerformWebRequest(String Url, String HTTPMethod)
at TwitterVB2.TwitterAPI.Update(String Text)
at WindowsApplication17.twt.Button1_Click(Object sender, EventArgs e) in D:\Users\WIM2\Documents\visual studio 2010\Projects\AppBar\AppBar\twitter.vb:line 28
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at WindowsApplication17.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Net.WebException
Message=The remote server returned an error: (401) Unauthorized.
Source=System
StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at TwitterVB2.TwitterOAuth.WebRequest(Method RequestMethod, String Url, String PostData)
InnerException:
CodenStuff wrote:Nope, it's just your sick and dirty mind. You sick twisted warped little pervo
after you download twitter dll, then add that dll in reference to your program
I added it as refrence..
CodenStuff wrote:Nope, it's just your sick and dirty mind. You sick twisted warped little pervo
What visual basic version do you use, and what framework is in the twitter client?
Have you register your application? place the Consumer key, Consumer secret, Access token, Access token secret?
Have you register your application? place the Consumer key, Consumer secret, Access token, Access token secret?
volttide wrote:What visual basic version do you use, and what framework is in the twitter client?Visual Studio 2010 Ultimate
Have you register your application? place the Consumer key, Consumer secret, Access token, Access token secret?
.NET Framework 3.5
Yes
CodenStuff wrote:Nope, it's just your sick and dirty mind. You sick twisted warped little pervo
Watch my tutorial here:
http://www.youtube.com/watch?v=YcSEAh6zl4Q
http://www.youtube.com/watch?v=YcSEAh6zl4Q
error :
A unhandled exception exception of type 'TwitterAPIException' occurred in TwitterVB.dll
can you correct my file please : can you pm me if you're done correcting my file
A unhandled exception exception of type 'TwitterAPIException' occurred in TwitterVB.dll
can you correct my file please : can you pm me if you're done correcting my file
You do not have the required permissions to view the files attached to this post.
corliansa wrote:error :this is not working anymore :geek:
A unhandled exception exception of type 'TwitterAPIException' occurred in TwitterVB.dll
can you correct my file please : can you pm me if you're done correcting my file
Find my programs on Softpedia
9 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023