简体   繁体   English

检查访客是否用Facebook登录的最简单方法

[英]The simplest way to check if a visitor is logged with facebook or not

I am develop a plugin for wordpress where I want a simple way to check if a guest of a page is login with facebook or not. 我正在开发一个用于wordpress的插件,在这里我想用一种简单的方法来检查网页的访客是否用Facebook登录。 I tried with the javascript SDK, but for this error: 我尝试使用javascript SDK,但遇到此错误:

Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. 应用程序配置不允许使用给定的URL:应用程序的设置不允许使用一个或多个给定的URL。 It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. 它必须与网站URL或Canvas URL匹配,或者域必须是该应用程序域之一的子域。

Would be a crazy that every user of the plugin will must create her own Facebook app. 插件的每个用户都必须创建自己的Facebook应用程序会很疯狂。

There is a simplest way to check if a visitor of a page is logged with facebook or not than JavaScript SDK? 除了JavaScript SDK,还有一种最简单的方法来检查网页的访问者是否用Facebook登录?

Maybe with the facebook cookie name? 也许使用Facebook cookie名称? or other flow? 或其他流程?

Not really, there is no officially supported way to check if a person is logged into Facebook except using the SDKs. 并非如此,除了使用SDK之外,没有官方支持的方法来检查用户是否已登录Facebook。 Even if you could fine one, they might break as soon as Facebook changes the slightest thing so you would be better off using the official SDKs provided. 即使您可以罚款,但Facebook更改任何细微更改后,它们可能会立即中断,因此最好使用提供的官方SDK。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM