Facebook is a popular social network portal, more and more applications are developed integrating facebook functions such as post on the wall, upload pictures to facebook.
Most time, the application is design for a single Facebook user, for my last project (a photo booth which allow user take photo and post the picture to Facebook) is a different case, and while developping, it was found that when a WebBrowser(C# Controll) used for facebook login, after closing the form which contains the WebBrowser and Dispose it, the Facebook login status is still there after the Form is repopened. Even the cookie file is clean, still cannot log off facebook. And there is no logoff function in Facebook SDK.
The solution I used is I make the login part to be a seperate Application, which will record the login Token after Facebook user login their facebook account, and send the login token to the main application when the facebook login application closed. While the application closing, the cookies are deleted.
This solution is worked in my project.
本文介绍了一个项目中遇到的问题:使用WebBrowser控件进行Facebook登录后,即使关闭并重新打开窗体,登录状态仍然存在。文章提供了一种解决方案,即将登录过程分离为单独的应用程序,并记录登录令牌供主应用使用。

4069

被折叠的 条评论
为什么被折叠?



