JayPee

FluxCP Registration Addon via Facebook

Recommended Posts

File Name: FluxCP Registration Addon via Facebook

File Submitter: JayPee

File Submitted: 11 Apr 2012

File Updated: 11 Apr 2012

File Category: Web Resources

This is a an alternative solution for those who cant make there Email Verification feature to work in there Registration System.

It uses Facebook to identify if the user has a valid Email Address.

Guides:

1.) Making your Facebook Application within Facebook

As you may know in order for this Addon to work you must create an application in facebook.

1.1: Login to your facebook account at http://www.facebook.com

1.2: After you login to your facebook account kindly goto https://developers.facebook.com

1.3: In developers homepage yoo will see a link name App, click it

1.4: When your already in the apps facebook you will see the Create New App button, now click it

1.5: A dialog box will appear, just fill up the necessary fields.

1.6: After you finished filling up the on the dialog box you will be redirected to your newly created Application Settings

1.7 The default page whenever you want to edit your application is the Basic Settings page.

2.) Basic Settings Application Configuration

2.1: In the Basic Settings page the most important field you need to edit is the App domain ( You will put here the Address where you want to run the Application ex: http://www.mydefaultro.com if you do not specify the App domain the Addon might not work properly), now click also the Website you will enter there also the Address where you will run the Application.

2.2: Now Save it. It might take several minutes for the settings to take effect.

3.) Auth Dialog Settings Application Configuration

3.1: In the Auth Dialog Settings Page just scroll at the very bottom and you will see Authenticated Referrals, now click it.

3.2: In Authenticated Referrals, in User & Friends Permission kindly enter the value "email" without the doubles quotesbecause the application must ask first a permission to know about the user's email.

3.3: Now click Save Changes.

4.) FluxCP Addon Configuration

4.1: We are now in the FluxCP Addon. Put the addon in the addons folder of your FluxCP.

4.2: Now edit the config/addon.php and fillup the following:

* For "FB_API_KEY" enter the Api Id that facebook provided to you, this can be seen in the basic settings of your Facebook Application. This key will be your public api id.

* For "FB_API_SECRET_KEY enter the Api Secret that facebook provided to you, this can be seen in the basic setting of your Facebook Application. This key will be your private apli id. Kindly do not share this to others.

Other Configuration's are:

* 'NoCase' - set to true if you dont want a case sensitive comparison

* 'UseMD5' - set to true if you want to use MD5 password

* 'level' - set this to what will be the default level/group_id of the user after registration.

5.) The Database

5.1: In schemas folder you will find a .sql file named cp_fb_register, kindly import in your database. This will use for the Facebook Login Addon that I will develop in the future.

Now run the Addon, Hope it works and Hope you understand my English /no1 Sorry I cant provide the Screenshot version of the guide because Im having a hard time making the screenshot due to make broken touchpad.

Updated version of this addon can be found at: https://github.com/m...-Facebook-Addon

Future Updates:

  • Login Feature - you can use your facebook account to login to the Control Panel
  • Auto Login after Registration

Click here to download this file

  • Upvote 3

Share this post


Link to post
Share on other sites

Sir JayPee can you share us some screenshot?

Share this post


Link to post
Share on other sites

Thanks Sir JayPee

sharing how it looks, from Sir JayPee's Demo Page

fbapi.png

Share this post


Link to post
Share on other sites

im getting this..."That 'redirect_uri' isn't allowed for that client_id."

Share this post


Link to post
Share on other sites

it means that your app domain and site URL where you are using your application is not permitted. Like in Basic Settingin the http://developers.facebook.com you specify the Site URL and App domain to be http://www.hello.com and you run the application at http://www.goodbye.com. Since you apply the application to run in www.hello.com, facebook will not permit you to use that on www.goodbye.com

Share this post


Link to post
Share on other sites

yes that's what I do

Share this post


Link to post
Share on other sites

Hi, JayPee..

i tried using http://www.asurahosting.com still nothing, any other solution? >.<

I don't wanna sound like a buzz kill, but please make your own thread for support. I bet JayPee and others would love to help there.

Keep on rocking, love the API!!!

P.S. So when is the Google API, lol?

Edited by Matrixfox

Share this post


Link to post
Share on other sites

oups sorry.. Mistake by myself xD

Edited by none

Share this post


Link to post
Share on other sites

@Mr BrycE

try to buy your own domain and hosting.

i think if your site is using a subdomain this addon will not work. ( happens to me with ip-board with facebook login. )

Edited by quesoph

Share this post


Link to post
Share on other sites

I think facebook doesnt allow subdomains. Coz i test it in my sourceforge account and it doesnt work.

Share this post


Link to post
Share on other sites

Hi there JayPee, can you tell me why am I seeing this and how will I solve it?

[/i]
[b]	Critical Error[/b]

An error was encountered during the lifetime of the application.
This could be due to a variety of problems, such as a bug in the application.
[b]However, normally it is caused by [i]misconfiguration[/i].[/b]
[b]	Exception Details[/b]

Error: [b]Exception[/b]
Message: [i]Facebook needs the CURL PHP extension.[/i]
File: /var/www/cp/addons/facebook/modules/facebook/base_facebook.php:19										File							Line							Function/Method											/var/www/cp/addons/facebook/modules/facebook/facebook.php							18							require_once()											/var/www/cp/addons/facebook/modules/facebook/create.php							2							require_once()											/var/www/cp/lib/Flux/Template.php							337							include()											/var/www/cp/lib/Flux/Dispatcher.php							168							Flux_Template::render()											/var/www/cp/index.php							177							Flux_Dispatcher::dispatch()			
[b]	Exception Trace As String[/b]

#0 /var/www/cp/addons/facebook/modules/facebook/facebook.php(18): require_once()
#1 /var/www/cp/addons/facebook/modules/facebook/create.php(2): require_once('/var/www/cp/add...')
#2 /var/www/cp/lib/Flux/Template.php(337): include('/var/www/cp/add...')
#3 /var/www/cp/lib/Flux/Dispatcher.php(168): Flux_Template->render()
#4 /var/www/cp/index.php(177): Flux_Dispatcher->dispatch(Array)
#5 {main}

Share this post


Link to post
Share on other sites

Hi there JayPee, can you tell me why am I seeing this and how will I solve it?

[/i]
[b]	Critical Error[/b]

An error was encountered during the lifetime of the application.
This could be due to a variety of problems, such as a bug in the application.
[b]However, normally it is caused by [i]misconfiguration[/i].[/b]
[b]	Exception Details[/b]

Error: [b]Exception[/b]
[color=#ff0000]Message: [i]Facebook needs the CURL PHP extension.[/i][/color]
File: /var/www/cp/addons/facebook/modules/facebook/base_facebook.php:19										File							Line							Function/Method											/var/www/cp/addons/facebook/modules/facebook/facebook.php							18							require_once()											/var/www/cp/addons/facebook/modules/facebook/create.php							2							require_once()											/var/www/cp/lib/Flux/Template.php							337							include()											/var/www/cp/lib/Flux/Dispatcher.php							168							Flux_Template::render()											/var/www/cp/index.php							177							Flux_Dispatcher::dispatch()			
[b]	Exception Trace As String[/b]

#0 /var/www/cp/addons/facebook/modules/facebook/facebook.php(18): require_once()
#1 /var/www/cp/addons/facebook/modules/facebook/create.php(2): require_once('/var/www/cp/add...')
#2 /var/www/cp/lib/Flux/Template.php(337): include('/var/www/cp/add...')
#3 /var/www/cp/lib/Flux/Dispatcher.php(168): Flux_Template->render()
#4 /var/www/cp/index.php(177): Flux_Dispatcher->dispatch(Array)
#5 {main}

It looks like your missing CURL PHP extension.

Share this post


Link to post
Share on other sites

Oh great, thanks. now it's working. thank you!

Share this post


Link to post
Share on other sites

Do I only have to put this in the addon folder and open it? I already finished configuring stuffs but I can't make it run inside the addon folder.

Share this post


Link to post
Share on other sites

I have a working demo here at: http://www.agonyro.net/fluxcptest

hi jaypee i try to set up but got an error upon registering can you help out thanks if you have time, just add me up on yahoo messenger here [email protected] thanks.

Error encounterer:

Unable to load the registration form for Random Ragnarok Online. You may have previously blocked this app on Facebook. Go to your Facebook privacy settings to unblock this app. (Error: That 'redirect_uri' isn't allowed for that client_id.)

Share this post


Link to post
Share on other sites

Open up your addon folder and find this file:

mandark022.../themes/default/facebook/create.php

Open the file and look for this line at the bottom of the file, near the end:

data-redirect-uri="http://agonyro.net/etc">

Change the URL ( "http://agonyro.net/..." ) to your site's. Save, upload and enjoy.

  • Upvote 1

Share this post


Link to post
Share on other sites

I'm having this kind of error...

Error in recording the facebook account in the database. Kindly inform the administrator about this error.

Edited by Jayzy

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...