该过程如下.
1. User clicks Facebook Login button
2. User signs in and grants perms
3. Facebook redirects uses FB.Event.subscribe auth.login to redirect my login controller
4. My login controller loads the fbconnect module and chains the method Connect()
5. Connect() Checks if there is a facebook user using getUser() and if true checks if they are an existing user to log them in or returns false if no facebook user was found.
Run Code Online (Sandbox Code Playgroud)
一切正常,除了唯一的问题是在被重定向到登录页面之后Connect返回False,当它实际上应该是真的正义fbuser登录并且已经授予了perms.如果我刷新但一切正常,则用户登录(如果存在)或者如果将新内容发送到注册页面.以下是我的代码..
<div id="fb-root"></div>
<script>
//initializing API
window.fbAsyncInit = …Run Code Online (Sandbox Code Playgroud) php facebook codeigniter facebook-javascript-sdk facebook-php-sdk