[英]How do you tell if a user has logged in to Facebook Connect in a ASP.NET User control?
How do you tell if a user has logged in to Facebook in a ASP.NET User control? 您如何判断用户是否已在ASP.NET用户控件中登录到Facebook?
I can tell whether or not they are logged in via a call in Javascript provided by the Facebook Javascript SDK. 我可以告诉他们是否通过Facebook Javascript SDK提供的Javascript调用登录。 (FB.getLoginStatus)
(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 (eg through jQuery.ajax()
). 我将编写一个客户端JavaScript函数,该函数通过AJAX调用(例如,通过
jQuery.ajax()
)来调用服务器端方法。
The JavaScript function could either be called during page load or through a timer that checks regularly. JavaScript函数可以在页面加载期间调用,也可以通过定期检查的计时器来调用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.