private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
String stringUrl = webBrowser1.Url.ToString();
if (stringUrl.StartsWith("https://www.facebook.com/connect/login_success.html"))
{
int index = stringUrl.IndexOf("=");
int index2 = stringUrl.IndexOf("&");
localAccessToken = stringUrl.Substring(index + 1, index2 - index - 1);
if (fcbDialog != null)
{
DisableComponents(fcbDialog);
this.Close();
}
}
}