Facebook registration plugin does not redirect / send registered user data

I just tried using the Facebook registration plugin on the iframe page tab.

In case someone wonders why I would like to do this, I want to use the Facebook registration plugin to create a newsletter registration form on my FB page.

I tried with this code:

<iframe src="https://www.facebook.com/plugins/registration.php? client_id=113869198637480& redirect_uri=& fields=name,birthday,gender,location,email" scrolling="auto" frameborder="no" style="border:none" allowTransparency="true" width="100%" height="330"> </iframe> 

and this code:

 <div id="fb-root"></div> <script src="https://connect.facebook.net/en_US/all.js#appId={YOUR_APP_ID}&xfbml=1"></script> <fb:registration fields="name,birthday,gender,location,email" redirect-uri="" width="530"> </fb:registration> 

In both cases, I used the APP_ID of the page tab application and the canvas URL for this page tab, but I filled in the website field with the website I used.

When I take out the pre-filled FB information and fill out the form, var_dump on the receiving page gives the correct information, but when I send it with the pre-filled FB information, it displays a pop-up message, you register in APP_NAME_HERE, if you want to do this, click "Continue" or cancel if you don't (something like that), and when I click Continue, nothing happens.

I used Firebug to check the page and I think the data is being sent to another iframe, but I don't know how to access it. I tried changing the target to _top, _self, and _parent, but that didn't work either. I also tried to create a new application specifically using the website attribute, and that didn't work either. Any help gratefully received.

+4
source share
4 answers

As far as I can tell, the target attribute is broken when using pre-populated information. Perhaps this has something to do with how the thread should happen when a confirmation popup appears, but AFAIK he did not document that the two cannot be used together. In any case, pre-populated data seems to affect the target=_top regardless of what you specify in the attributes.

In this case, you will need to specify the external address of the page as redirect_uri and process the data, and then redirect back to the address of the Facebook page. If necessary, you can pass some data back using the app_data parameter in the query string.

+1
source

Most likely, you are already marked as registered and get a cookie / header back to connect FB to work. If so, you will need to unregister your facebook application on the application management page. After that, the button will work again.

Finally, if the user is registered on Facebook and is already connected to your application, the button will say β€œLogin” and will not do anything when (but your application should detect this state using getLoginStatus and not show the button).

https://developers.facebook.com/docs/plugins/registration/

You can debug your registration status using

 FB.Event.subscribe('auth.statusChange', function(response) { if(!response.authResponse) return; console.log(response) }); 

Hope this helps.

0
source

It seems to me that you are missing something:

<fb: register>

Here you can see that tha is an onvalidate attribute that contains the name of the js function that is called after clicking the Register button, to which the entire object containing information about the user is transferred. Greetings;) Luke

-1
source

In the second code, redirect-uri = "" requires a value. It must be the URL prefix of your site.

-1
source

All Articles