Click here to Skip to main content
15,921,295 members
Home / Discussions / C#
   

C#

 
GeneralRe: file close issue Pin
George_George10-Jun-08 21:36
George_George10-Jun-08 21:36 
GeneralRe: file close issue Pin
Ashfield10-Jun-08 21:12
Ashfield10-Jun-08 21:12 
GeneralRe: file close issue Pin
George_George10-Jun-08 21:38
George_George10-Jun-08 21:38 
AnswerRe: file close issue Pin
N a v a n e e t h10-Jun-08 21:06
N a v a n e e t h10-Jun-08 21:06 
GeneralRe: file close issue Pin
George_George10-Jun-08 21:35
George_George10-Jun-08 21:35 
GeneralRe: file close issue Pin
N a v a n e e t h11-Jun-08 16:15
N a v a n e e t h11-Jun-08 16:15 
GeneralRe: file close issue Pin
George_George11-Jun-08 16:18
George_George11-Jun-08 16:18 
Questionfacebook login. Pin
udikantz10-Jun-08 17:05
udikantz10-Jun-08 17:05 
hey im trying to make an app that will log in to facebook ,
im using the following method to establish connection and post my credentials:


<br />
public static void start_post(string strPage, string strBuffer)<br />
        {<br />
            //Our postvars<br />
            byte[] buffer = Encoding.ASCII.GetBytes(strBuffer);<br />
            //Initialisation<br />
            <br />
            HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(strPage);<br />
            //Our method is post, otherwise the buffer (postvars) would be useless<br />
            WebReq.Method = "POST";<br />
            //We use form contentType, for the postvars.<br />
           <br />
            WebReq.ContentType = "application/x-www-form-urlencoded";<br />
            //The length of the buffer (postvars) is used as contentlength.<br />
            WebReq.ContentLength = buffer.Length;<br />
            //We open a stream for writing the postvars<br />
            WebReq.Referer = "http://www.facebook.com/index.php?";<br />
            <br />
            Stream PostData = WebReq.GetRequestStream();<br />
            //Now we write, and afterwards, we close. Closing is always important!<br />
            PostData.Write(buffer, 0, buffer.Length);<br />
            PostData.Close();<br />
            //Get the response handle, we have no true response yet!<br />
            HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();<br />
            //Let's show some information about the response<br />
            Console.WriteLine(WebResp.StatusCode);<br />
            Console.WriteLine(WebResp.Server);<br />
<br />
            //Now, we read the response (the string), and output it.<br />
            Stream Answer = WebResp.GetResponseStream();<br />
            StreamReader _Answer = new StreamReader(Answer);<br />
            reply = _Answer.ReadToEnd();<br />
            Console.WriteLine(reply);<br />
        }<br />


i get the following respond from facebook:
"sorry, we're not cool enough to support your browser. please keep it real with the following browsers: ...."

any idea how to work around this facebook check , as im sending same data as my IE agent i dont know what else will work , asking for your expert help.
thank you.

Net

AnswerRe: facebook login. Pin
leppie10-Jun-08 23:37
leppie10-Jun-08 23:37 
GeneralRe: facebook login. Pin
udikantz11-Jun-08 3:22
udikantz11-Jun-08 3:22 
AnswerRe: facebook login. Pin
Brandon Toner17-Mar-09 11:15
Brandon Toner17-Mar-09 11:15 
AnswerRe: facebook login. [modified] Pin
Member 41081678-Sep-09 23:16
Member 41081678-Sep-09 23:16 
QuestionHow initiate GPRS connection in WM 6 Pin
manu4ever10-Jun-08 12:12
manu4ever10-Jun-08 12:12 
QuestionCompiler options in C# Pin
Member 391904910-Jun-08 11:51
Member 391904910-Jun-08 11:51 
AnswerRe: Compiler options in C# Pin
Christian Graus10-Jun-08 11:57
protectorChristian Graus10-Jun-08 11:57 
GeneralRe: Compiler options in C# Pin
Member 391904910-Jun-08 12:05
Member 391904910-Jun-08 12:05 
GeneralRe: Compiler options in C# Pin
Christian Graus10-Jun-08 12:25
protectorChristian Graus10-Jun-08 12:25 
GeneralRe: Compiler options in C# Pin
Member 391904910-Jun-08 12:46
Member 391904910-Jun-08 12:46 
GeneralRe: Compiler options in C# Pin
Christian Graus10-Jun-08 13:04
protectorChristian Graus10-Jun-08 13:04 
GeneralRe: Compiler options in C# Pin
Judah Gabriel Himango10-Jun-08 13:24
sponsorJudah Gabriel Himango10-Jun-08 13:24 
QuestionDatatable issue Pin
NewToAspDotNet10-Jun-08 10:41
NewToAspDotNet10-Jun-08 10:41 
AnswerRe: Datatable issue Pin
Christian Graus10-Jun-08 11:09
protectorChristian Graus10-Jun-08 11:09 
Questiona security problem [modified] Pin
Sajjad Izadi10-Jun-08 10:16
Sajjad Izadi10-Jun-08 10:16 
AnswerRe: a security problem Pin
Christian Graus10-Jun-08 11:10
protectorChristian Graus10-Jun-08 11:10 
GeneralRe: a security problem Pin
Sajjad Izadi10-Jun-08 11:17
Sajjad Izadi10-Jun-08 11:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.