Please note: this is not official by any stretch, it does work however
You can see a working example here:
Yesterday I was reading about different ways to increase free trial signups/opt-ins and came across a few posts/pages/sites talking about the tremendous increase seen after implementing "Facebook Login/Connect" to allow their users to either sign up or log into their website.
For those of you who don't know what I'm talking about, it's the little button that you simply click to sign up or into a third party website using your Facebook account. You can imagine what kind of impact that could have...allowing a user to sign up/into with just a click of the mouse.
So I came onto here yesterday to ask about this feature only to find it is not a feature currently implemented...so I decided to take care of it myself.
The primary functions are still all entirely left to the regular functionality of DAP. This script is essentially just pulling the users information from facebook, inputting it into either the signup or login form and then "clicking" the signup/login button.
- You have to be running PHP 5.4+ for this to work, as it relies on Facebooks latest SDK, which requires that version of PHP or higher.
- I'm also running DAP v4.6.2, so I haven't tested it on other versions and am not aware of whether it will work on them or not. My GUESS is that it will, as I'm not using any special functions
- You need to download the Facebook PHP SDK from here: https://github.com/facebook/facebook...ve/4.0-dev.zip
(You'll need an active facebook app, which takes seconds to create here: https://developers.facebook.com/apps...-setup/dialog/ and then make sure it is "live")
1) Download the 3 required files from here: https://www.mediafire.com/?luy68ja2w068g22 (the 3 files in that .rar file are all just text files...two .php files & one .js file)
2) Edit the "settings" area in all 3 files at the top. I have fully commented all 3 files so the instructions within them should leave you without any questions...feel free to ask if you've got any though.
3) Once the settings are edited & saved (and you're 100% sure they're correct!) upload "login.php" & "signup.php" to the ROOT of your site. Should both be accessible at: http://YourSite.com/login.php or signup.php. Then upload 'fbloginsignup.js' to a "scripts" folder that is at the root of your site. If done correctly, you should be able to access it at: http://YourSite.com/scripts/fbloginsignup.js
4) Download the Facebook PHP SDK from here: https://github.com/facebook/facebook...ve/4.0-dev.zip
5) Create a folder entitled "facebook" at the root of your site (should be accessible at: http://YourSite.com/facebook )
6) Unzip the FB SDK you downloaded, open the folder that was created when you unzipped it, and upload the entire CONTENTS of that folder to the 'facebook' folder you created a second ago. If you did it correctly, you should be able to navigate to: http://YourSite.com/facebook/src/Facebook
8) That's it! Now to call the script, you're either going to either want to call the 'signup' function or the 'login' function.
To call the "signup" function, create a button like this:
(you'll change the 63 to whatever product ID you want them to be signed up for within DAP. It must be a product that allows for free signups though!)
<a href="#" id="dap_facebook_signup" data-productid="63" onclick="fb_signup();"><img src="/images/fb_signup.png"></a>
To call the "login" function, create a button like this:
Any questions, just post 'em here.
<a href="#" onclick="fb_login();"><img src="/images/fb_login.png"></a>