How do you tell if a user has logged in to Facebook Connect in a ASP.NET User control?
How do开发者_JS百科 you tell if a user has logged in to Facebook in a ASP.NET User control?
I can tell whether or not they are logged in via a call in Javascript provided by the Facebook Javascript SDK. (FB.getLoginStatus)
But how do I have a server control know?
I would write a client-side JavaScript function that calls a server-side method through an AJAX call (e.g. through jQuery.ajax()
).
The JavaScript function could either be called during page load or through a timer that checks regularly.
精彩评论