Click here to Skip to main content
15,886,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI Dears

How I Can Get Post data from facebook group wall for use in my program webrequest??

i try it but not give answer

is true?

VB
Dim postData As String = [String].Format("xhpc_message_text={0}&_42ft _4jy0 _11b _4jy3 _4jy1 selected={1}", "eheem", "Clicked")




<img href="#" src="http://s5.picofile.com/file/8131065892/facebookpost.JPG"></img>
Posted
Updated 20-Jul-14 10:04am
v3

after login i folow this code! where is my wrong??

thanks!

VB
Dim getUrl As String = "https://www.facebook.com/groups/1384958178382578/"
      Dim postData As String = [String].Format("xhpc_message_text={0}&_42ft _4jy0 _11b _4jy3 _4jy1 selected={1}", "eheem", "Clicked")
      Dim getRequest As HttpWebRequest = DirectCast(WebRequest.Create(getUrl), HttpWebRequest)
      getRequest.CookieContainer = New CookieContainer()
      getRequest.CookieContainer.Add(cookies)
      'recover cookies First request
      getRequest.Method = WebRequestMethods.Http.Post
      getRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2"
      getRequest.AllowWriteStreamBuffering = True
      getRequest.ProtocolVersion = HttpVersion.Version11
      getRequest.AllowAutoRedirect = True
      getRequest.ContentType = "application/x-www-form-urlencoded"

      Dim byteArray As Byte() = Encoding.ASCII.GetBytes(postData)
      getRequest.ContentLength = byteArray.Length
      Dim newStream As Stream = getRequest.GetRequestStream()
      'open connection
      newStream.Write(byteArray, 0, byteArray.Length)
      ' Send the data.
      newStream.Close()

      Dim getResponse As HttpWebResponse = DirectCast(getRequest.GetResponse(), HttpWebResponse)
      Dim sourceCode As String
      Using sr As New StreamReader(getResponse.GetResponseStream())
          sourceCode = sr.ReadToEnd()

      End Using
 
Share this answer
 
im in wait :( please help me brothers
 
Share this answer
 
No one is here? in code project???
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900