facebook registration plugin - show on click only? - facebook

I am trying to implement the FB registration plugin on my site but it is active/opened by default. is there a way to have it open only when a user clicks on the Register/Login button instead?

Put it in a hidden div and then show the div when you want to with javascript

Put this on the page where you want Register button to be displayed:
<fb:login-button registration-url="http://yoursite.com/facebookregistration" />
facebookregistration page should have the registration form:
<fb:registration
fields="[
{'name':'name'},
{'name':'email'},
{'name':'gender'},
{'name':'birthday'}
]"
</fb:registration>
For more information refer to Facebook Developers page

Related

Why is my facebook like button applying to the "social plugins" page?

I have added a facebook like button to my site at http://forkmyreligion.com. I have triple checked all the settings for the app on my developers.facebook page and I'm pretty sure its all correct - the domain is correct, the website url is correct and I have the correct app id for the application.
The problem though is that clicking on the like button results in the user liking the facebook social plugins page rather than my page.
Any ideas what the problem might be?
Thanks
The Like button on your page is Liking the social plugins page because the Like button on your page has a data-href parameter which is explicitly configuring the like button to like that URL:
You have this:
<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-colorscheme="light" data-layout="standard" data-action="like" data-show-faces="true" data-send="false"></div>
You need to set the data-href to the URL you want the button to display and increment the like count of.
This parameter is mentioned on the Like button documentation and the example in the documentation is the URL https://developers.facebook.com/docs/plugins/

share a wordpress page on Facebook before submit a form

I have a custom plugin in wordpress which will take a contest answer and visitor name and email in a form.I want to share my page on facebook before visitor submit the form. if the visitor doesnt share my page his form will not be submitted.How can I track that visitor share my page and let the system submit the form after page sharing i completed. I got a script from facebook send where i can put my page url for sharing.
<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fparse.com" target="_blank">
Share on Facebook
I've used this jQuery plugin before. It gives you a callback for like and unlike. You'd just have to disable the submit button until the user likes and then disable it if they unlike it.
There are also versions for Google+ +1 and Twitter shares as well.

Why different facebook plugins using the same div id name?

We want to integrate the facebook login button plugin, facebook like button, facebook comments with in one page for different purpose.
But we found that they all using the same div id #fb-root. As we know, one div id should be used only time for one page...
How to solve it?
You only need one fb-root. The like button, login, etc will generate where you put the "like", "login", etc tags.
<div class="fb-like" data-send="true" data-width="450" data-show-faces="true"></div>
"Include the JavaScript SDK on your page once, ideally right after the opening tag."
This contains fb-root
Then, Place the code for your plugin wherever you want the plugin to appear on your page.

Link to a facebook application from a facebook page does not work?

I have a ready facebook application that should be linked to a facebook page. I am trying to link the canvas url of my application to a button in the page with the help of javascript by calling:
function onBtnClick() { window.location = "http://apps.facebook.com/CANVAS_URL/"; }
When I click the button that is supposed to take me to the app I get only an empty page with a blue box and "Facebook" string inside it (pretty much looking like the facebook logo)
This box is a link to my application and if clicked takes me to http://apps.facebook.com/CANVAS_URL/
The same problem occurs in the application, where I try to link the facebook page. The link there is a regular <a> tag.
Do you have any ideas how to redirect to an app without this additional "Facebook" page?
Thanks in advance,
Martin
Use this instead:
top.location.href = "http://apps.facebook.com/CANVAS_URL/";
You need the upper frame (Facebook) to redirect.
If using a simple <a> html link, try target="_top"

Facebook Graph API using ASP.NET with fancybox

Anyone know of some trick I can use to get facebook to authenticate a user within a fancybox iFrame? ... when I use the following code facebook dosent present the user with a login box, rather it gives them a link to facebook which puts the user back in the parent window
<a id="aFbLogin" href="https://graph.facebook.com/oauth/authorize?client_id=XXX&redirect_uri=http://ahost.com/callback.aspx&scope=email" type="text/html"><img style="border-style: none"
src="/Images/fBookLogin.png" alt="FaceBook Login Button"
title="Login with FaceBook" id="btnFbLogin" height="36" width="67" /></a>
Then some JavaScript to add the click event handler ... the pop up works .. but Facebook seems to not like being in an Fancybox-iFrame
Facebook has various measures (using css and javascript) in place to ensure that it is never hosted in an iframe. I'm afraid you are limited to using the popup implementation provided with the javascript sdk.