جميل كيف طريقة اضافة المكتبة للمشروع
سويت كل شيء و طلع الكود كتالي به مشاكل و اريد معرفة اضافة المكتبة كيف
Imports TwitterVB2
Imports System.Text
Imports System.IO
Public Class Form2
Public tw As New TwitterAPI
Dim consumer As String = "ves1M1h9KduQ2Gxg8NUWzA"
Dim consumersecret As String = "fQ3Y9uoUDc6fXAIIWQnpWGtAuCterMoXV4rY5Mg"
Public oauthtoken As String = tw.OAuth_Token
Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
If oAuthisSaved(Form1.TextBox2.Text) = True Then
'Don't need to register thingy
Dim reader As New System.IO.StreamReader(My.Application.Info.DirectoryPath + "/" + Form1.TextBox3.Text + ".txt")
Dim read As String = reader.ReadToEnd
oauthtoken = read.Split("/")(0)
oauthtokensecret = read.Split("/")(1)
tw.AuthenticateWith(consumer, consumersecret, oauthtoken, oauthtokensecret)
Label1.Text = tw.AccountInformation.Name
PictureBox1.Image = Form1.PictureBox1.Image
End If
End Sub
Dim writer As New System.IO.StreamWriter(My.Application.Info.DirectoryPath + "/" + username + ".txt", False)
writer.Write(oAuth + "/" + oAuthSecret)
writer.Close()
'This saves the oAuth in a text file
end sub
Function oAuthisSaved(ByVal username As String) As Boolean
If My.Computer.FileSystem.FileExists(My.Application.Info.DirectoryPath + "/" + username + ".txt") Then
Return True
Else
Return False
End If
End Function
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
tw.AuthenticateWith(consumer, consumersecret, oauthtoken, oauthtokensecret)
ProgressBar1.Value = 25
tw.UserSearch(TextBox1.Text)
ProgressBar1.Value = 25
For Each user In tw.UserSearch(TextBox1.Text)
Dim u As New ListViewItem
ProgressBar1.Value = 59
u = ListView1.Items.Add(user.ScreenName.ToString)
ProgressBar1.Value = 75
u.SubItems.Add(user.Name.ToString)
Next
ProgressBar1.Value = 100
MsgBox("User search complete")
ProgressBar1.Value = 0
End Sub
Private Sub ListView1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListView1.SelectedIndexChanged
End Sub
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
tw.AuthenticateWith(consumer, consumersecret, oauthtoken, oauthtokensecret)
tw.Follow(TextBox2.Text)
MsgBox("Succsess")
End Sub
End Class
انا رفعت المشروع ياليت واحد يعدله لي بكون شاكر له و الله تعبت معه
https://up.top4top.net/downloadf-613fyzgh2-zip.html