问题描述:

Basically I am using a iframe for Facebook Registration

<iframe src="https://www.facebook.com/plugins/registration?

client_id=<my_app_id>&

redirect_uri=http://localhost:3000/&

fields=name,gender,email"

scrolling="auto"

frameborder="no"

style="border:none"

allowTransparency="true"

width="100%"

height="330">

</iframe>

The first problem is the fields gender and email are not showing, only the name is displayed

The second problem is when I click register, it routes to

/%20%20%20%20%20%20%20%20%20%20%20%20%20fields=name,gender,email

and I don't know why. Was expecting it to route to localhost as per indicated in the redirect_uri field.

Any help is appreciated.

网友答案:

The %20's appearing in your redirect are html-encoded spaces.

They're appearing because of the newlines and indentation in your iframe's SRC.

Try removing the newlines, and the redirect should work.

<iframe src="https://www.facebook.com/plugins/registration?client_id=<my_app_id>&redirect_uri=http://localhost:3000/&fields=name,gender,email" scrolling="auto" frameborder="no" style="border:none" allowTransparency="true" width="100%" height="330">
</iframe>
相关阅读:
Top