Devam Ediyor

twitter upload profile image, c# or vb, vb needed

this use to work,, here is the full code,, it worked a day ago and now it doesned,, you figure it out,, i dont have the time,,

'THE BUTTON I MADE TO INITIATE THE SUB CALLED UPLOADPROFILEIMAGE

Private Sub Button37_Click_1(ByVal sender As [url removed, login to view], ByVal e As [url removed, login to view]) Handles [url removed, login to view]

Dim photo As Byte()

photo = [url removed, login to view]("[url removed, login to view]")

UploadProfileImage(photo, username:=("AnaisAlice20"), pwd:=("pass99"))

End Sub

'THE SUB WHICH THE BUTTON CALLED

Public Shared Sub UploadProfileImage(ByVal photo As Byte(), ByVal username As String, ByVal pwd As String)

'photo is just a byte array of the image data

'Dim photo As Byte()

photo = [url removed, login to view]("c:\[url removed, login to view]")

Dim request As HttpWebRequest = DirectCast([url removed, login to view]("[url removed, login to view]"), HttpWebRequest)

[url removed, login to view] = False

[url removed, login to view] = True

[url removed, login to view] = True

Dim boundary As String = [url removed, login to view]().ToString()

[url removed, login to view] = New NetworkCredential(username, pwd)

[url removed, login to view] = [url removed, login to view]("multipart/form-data;boundary={0}", boundary)

[url removed, login to view] = "POST"

' Build Contents for Post

Dim header As String = "--" & boundary

Dim footer As String = "--" & boundary & "--"

Dim contents As New StringBuilder()

' Image

[url removed, login to view](header)

[url removed, login to view]([url removed, login to view]("Content-Disposition:form-data); name=""image""); filename=""{0}""", "[url removed, login to view]"))

[url removed, login to view]("Content-Type: image/jpeg")

[url removed, login to view]()

[url removed, login to view]([url removed, login to view]("iso-8859-1").GetString(photo))

' Footer

[url removed, login to view](footer)

' Data that is sent with the post

Dim bytes As Byte() = [url removed, login to view]("iso-8859-1").GetBytes([url removed, login to view]())

[url removed, login to view] = [url removed, login to view]

Using requestStream As Stream = [url removed, login to view]()

[url removed, login to view](bytes, 0, [url removed, login to view])

[url removed, login to view]()

[url removed, login to view]()

' Using response As WebResponse = [url removed, login to view]()

'Using reader As New StreamReader([url removed, login to view]())

'Dim s As String = [url removed, login to view]()

'End Using

'End Using

End Using

End Sub

Beceriler: .NET, C Programlama, C# Programlama, Elektronik Pazarlama, Visual Basic

Daha fazlasını görün: post image twitter, upload image twitter, twitter upload image, upload twitter, upload photo twitter, post twitter image, upload twitter image, twitter photo upload, image twitter, twitter upload profile, xml programming needed, visual basic net array, vb work, net array, stream programming, public programming, name text image, multipart form request, method programming, string programming, programming string, programming array, array programming, upload image twitter using, code upload image

İşveren Hakkında:
( 14 değerlendirme ) Vancouver, Canada

Proje NO: #761160

Seçilen:

kishanbm

Hi, please check PMB

1 gün içinde 50$ USD
(7 Değerlendirme)
3.0

4 freelancer bu iş için ortalamada 106$ teklif veriyor

sandeep25101982

Hi! VB.Net experts here ! I just looked at VB code I can fix this immediately ! Awaiting a positive response from your end ! Thanks

1 gün içinde 100$ USD
(32 Değerlendirme)
6.5
YashpalSingh123

C#, .net professional, ready to start

1 gün içinde 150$ USD
(9 Değerlendirme)
4.8
vardars

C# Senior Web Developer

in 2 gün içinde125$ USD
(0 Değerlendirme)
0.0