Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

registration-url parameter fails for fb:login-button if oauth 2.0 is enabled

I'm trying to get the registration flow for Facebook login working. Here's a bare-bones example:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">     <head>       <title>My Facebook Login Page</title>     </head>     <body>       <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>        <div id="fb-root"></div>        <script type="text/javascript">          FB.init({              appId:'xxxxxxxxxxx',              cookie:true,              status:true,              xfbml:true,             channelUrl  : 'http://<myWebSite>/channel.html',             oauth:true          });       </script>       <fb:login-button registration-url="http://<myWebSite>/register"/>     </body>  </html> 

(The only things I've replaced above are the website and the appID)

If I try it like this, the login button shows up, but clicking it causes FireBug to report 'Unknown status: undefined' in the browser log. If I remove the 'oauth=true' line though, it works. I'm trying to adhere to the new oauth 2.0 standard, so I'd like to leave it in. Has anyone else run into this? Seems like if this was a bug, it would have been caught pretty early on.

like image 807
Shaun Budhram Avatar asked Aug 26 '11 10:08

Shaun Budhram


People also ask

How do I Set up Facebook OAuth?

In the App Dashboard, choose your app and scroll to Add a Product Click Set Up in the Facebook Login card. Select Settings in the left side navigation panel and under Client OAuth Settings, enter your redirect URL in the Valid OAuth Redirect URIs field for successful authorization.

Where is client OAuth settings in Facebook?

In your Facebook app configuration, click on the Settings tab on the left-hand navigation menu. Then go to the Advanced tab at the top and scroll down to the Client OAuth Settings section.

How to integrate Facebook Login in website?

#3: Set Up Facebook Login for Your Website At this point, you'll see Facebook Login among your website app options. Click the Set Up button to get started. Next, you'll fill in the information about how and where you'll use the app. You can add the Facebook Login feature on any app across multiple devices.


1 Answers

the 'registration-url' parameter is no longer supported by , take a look in the documentation of it. http://developers.facebook.com/docs/reference/plugins/login/

Just check if the user is logged in via the JS-SDK

like image 174
Frederick Behrends Avatar answered Sep 20 '22 08:09

Frederick Behrends