2009-08-04 35 views

回答

0

檢查會話密鑰cookie。

public static string SessionKey 
    { 
     get { return GetFacebookCookie("session_key"); } 
    } 

    private static string GetFacebookCookie(string propertyName) 
    { 
     var fullName = ApiKey + "_" + propertyName; 

     if (HttpContext.Current == null || HttpContext.Current.Request.Cookies[fullName] == null) 
      return null; 

     return HttpContext.Current.Request != null ? HttpContext.Current.Request.Cookies[fullName].Value : null; 
    } 
+0

你從哪裏得到ApiKey?是那個類中存儲的私有變量? – Matt 2009-08-04 07:18:21

相關問題