Hi all,
I'm trying to post a message to my* facebook wall with using httpwebrequest.
First of all i should explain the project. winform has listbox which can split the usernames and passwords with character ":"
and a button to check all accounts if their situation are ok or not. i'm checking one by one with this code and it's working.
My problem is to send a message with using these accounts to their walls.
login check is ok, but after login check i cannot use again account list for sending message. i hope i could explain it.
ps : i do
not want to use sdk,api or webBrowser.
thanks
ps 2 : in short, i have fb account list and i want to send a message to their walls with using httpwebrequest.
Thanks all.
LOGIN CONTROL CODE :
bool flag = false;
CookieContainer container = null;
string s = "&email=" + ee+ "&pass=" + pp+ "";
CookieContainer mycontainer2 = new CookieContainer();
byte[] bytes = new UTF8Encoding().GetBytes(s);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://m.facebook.com/login.php");
request.Method = "POST";
request.KeepAlive = true;
request.CookieContainer = mycontainer2;
request.ContentType = "application/x-www-form-urlencoded";
request.Referer = "https://m.facebook.com/";
request.UserAgent = byAgent;
request.ContentLength = bytes.Length;
request.GetRequestStream().Write(bytes, 0, bytes.Length);
HttpWebResponse response = null;
response = (HttpWebResponse)request.GetResponse();
container2.Add(response.Cookies);
container = mycontainer2;
string str2 = new StreamReader(response.GetResponseStream()).ReadToEnd();