我如何在Facebook Groupwall上获得Postdata [英] How I Can Get Postdata On Facebook Groupwall

查看:59
本文介绍了我如何在Facebook Groupwall上获得Postdata的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI亲爱的



如何从facebook组墙发布数据,以便在我的程序webrequest中使用?



i尝试但不回答



是真的吗?



  Dim  postData 作为 字符串 = [字符串]。格式(  xhpc_message_text = {0 }& _42ft _4jy0 _11b _4jy3 _4jy1 selected = {1}  eheem 点击









< img href =#src =http://s5.picofile.com/file/8131065892 /facebookpost.JPG\"></img>

解决方案

登录后我将关注此代码!哪里错了?



谢谢!



  Dim  getUrl  As   String  =   https://www.facebook.com/groups/1384958178382578/ 
Dim postData 作为 字符串 = [字符串]。格式( xhpc_message_text = {0}& _42ft _4jy0 _11b _4jy3 _4jy1 selected = { 1} eheem 点击
Dim getRequest 作为 HttpWebRequest = DirectCast (WebRequest.Create(getUrl),HttpW ebRequest)
getRequest.CookieContainer = CookieContainer()
getRequest.CookieContainer.Add(cookies)
' 恢复cookie第一次请求
getRequest.Method = WebRequestMethods.Http.Post
getRequest.UserAgent = Mozilla / 5.0(Windows NT 6.1)AppleWebKit / 535.2(KHTML,与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)
' 发送数据。
newStream.Close()

Dim getResponse As HttpWebResponse = DirectCast (getRequest.GetResponse (),HttpWebResponse)
Dim sourceCode As 字符串
使用 sr 作为 StreamReader(getResponse.GetResponseStream())
sourceCode = sr.ReadToEnd()

结束 使用


< blockquote>我在等待:(请帮助我兄弟


没有人在这里?在代码项目???


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?

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>

解决方案

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

thanks!

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


im in wait :( please help me brothers


No one is here? in code project???


这篇关于我如何在Facebook Groupwall上获得Postdata的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆