简体   繁体   中英

Log in using facebook to get the source of a web page (C#)

I want to get the source of a web page, and I have to be logged in using facebook to access that page. I know I can use WebClient (or HttpWebRequest) to get a web page source in C#, but how do I log in to that site using a facebook account?

You would need to replicate, in code, the Facebook login form. In other words, you will need to study the facebook login form, determine the action of the form, and collect the same data in your application that the login form collects, and send this data to the facebook site via http(s) get/post to the login form action url via the WebClient or HttpWebRequest or any other valid http transport mechanism, possibly even Socket.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM