Lio*_*ior 2 javascript facebook
我正在尝试使用javascript检查用户是否登录到Facebook(刚刚登录或未登录,与我的应用程序无关).
我尝试在FB.init之后使用以下代码:
edge.create工作正常.
FB.getLoginStatus(function(response) {
alert(response.status);
});
有一些黑客可以提供帮助,但不适合你的情况.https://grepular.com/Abusing_HTTP_Status_Codes_to_Expose_Private_Information
这是一个简单的例子:
<html>
<head>
</head>
<body>
// At the end of page will be good
<script>
function logged() {
alert('logged');
}
function notlogged() {
alert('not logged');
}
</script>
<script src="http://www.facebook.com/ajax/composer/attachment/question/question.php" onload="logged()" onerror="notlogged()">
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9373 次 |
| 最近记录: |