[ABD] Facebook graph/connect logins and registration

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
Skinny Vinny
Registered User
Posts: 230
Joined: Tue Dec 01, 2009 7:10 pm

[ABD] Facebook graph/connect logins and registration

Post by Skinny Vinny » Sat Jul 17, 2010 6:00 pm

Big update! File has been submitted to mod db as "Facebook Connect Logins and Registrations"

Modification Name: Facebook Graph/Connect for phpBB
Author: Skinny Vinny

Modification Description: Enables users to login and register to phpBB powered boards and sites with their Facebook accounts.
Modification Version: 0.1

Requirements: This mod will perform best on php version 5.2.x or greater, however compatibility with prior versions has been incorporated (curl functions resort to fgc if not available, and json decode enabled through a 3rd party class).

Demo URL: http://svmods.com/index.php

Modification Download: http://svmods.com/download/svmods_faceb ... _phpbb.zip and first version of installation instructions can be found at http://svmods.com/viewtopic.php?f=7&t=4


'Respect' to those modders that have tackled this before, but to my knowledge there has not been a simple or stable facebook connect integration (due largely to the frequently changing facebook apis and terms) made available.

I'm completing a phpBB hook that will provide the basic functionality for Facebook graph/connect login and registration, and to serve as the foundation for additional Facebook features as extensions of it.

This hook currently requests more permissions than used in this basic version, but will be required later in additional features/uses via extensions.

The best part of this modification is that it is indeed a phpBB hook: there are absolutely no edits needed to the original phpBB source code! Installation is as simple as adding a few values to the template, uploading the hooks file(s), purging the cache, and entering your app id and app secret into the ACP board settings (fields added by the hook as well). Optionally, you can edit the text used in the hook by adding values to your lang files to override the defaults.

Update: hook is now packed with modx, automod ready.

This hook utilizes facebooks javascript api to eliminate the bulk of work/load from your sites server. In using the js api, we eliminate possible performance issues on our sites from fb unstability: no back end calls to remote servers in typical page requests. The clients browser does the bulk of our work via js.
Last edited by DavidIQ on Sat Dec 18, 2010 8:57 pm, edited 9 times in total.
Reason: Marked as abandoned

Danielx64
Registered User
Posts: 1369
Joined: Wed Nov 04, 2009 5:51 am
Location: In a server room in Australia
Name: Daniel
Contact:

Re: [ALPHA] Facebook graph/connect logins and registration

Post by Danielx64 » Sun Jul 18, 2010 2:19 am

OMFG, I can't wait to test this out :) When will it come out?
Please note that I will not be porting any of my mods to phpBB 3.1. Sorry for the inconvenience this may cause.
Image

Skinny Vinny
Registered User
Posts: 230
Joined: Tue Dec 01, 2009 7:10 pm

Re: [ALPHA] Facebook graph/connect logins and registration

Post by Skinny Vinny » Sun Jul 18, 2010 4:34 pm

Did some more work with the hook last night, updated op.

I really want this to work without editing the original source, so I had to create a 'fix' to allow a users fb pic as the avatar: fb pic urls take the form of graph.facebook.com/UID/picture (with size options as ?type= values, defaults to square 50 x 50). phpBB does not see this as a valid remote avatar url. I solved it with htaccess by redirecting yourdomain.com/facebookuserimageUID.jpg to the fb graph url. For admins that can not access htaccess, or running on page servers other than apache, I may add option to ACP to point the path to a remote redirect. Update: I setup a subdomain with htaccess prepared to bounce these requests. I'll add the ACP option to use it in place of htaccess, but I strongly encourage admins to setup their own with the htaccess additions that I will provide.

Note, I setup condition in hook to only enable the fb pic avatar if remote avatar linking is enabled in the ACP. If you do not allow external avatars, then no remote fb avatar. This could change later, but it was a logical condition so was scripted as such.

I'll be out much of today and tomorrow, but hope to have this completed in the next few days. I'll document its behavior in greater detail on the demonstration board at that time.
Last edited by Skinny Vinny on Sun Jul 18, 2010 6:15 pm, edited 1 time in total.

User avatar
heredia21
Registered User
Posts: 942
Joined: Sun Apr 18, 2010 6:14 pm
Contact:

Re: [ALPHA] Facebook graph/connect logins and registration

Post by heredia21 » Sun Jul 18, 2010 5:05 pm

So if we are already logged in to facebook. Are we going to be required to log in again to the forums?
Best BlackBerry website for all users! BlackBerry News - http://blackberryempire.com

Skinny Vinny
Registered User
Posts: 230
Joined: Tue Dec 01, 2009 7:10 pm

Re: [ALPHA] Facebook graph/connect logins and registration

Post by Skinny Vinny » Sun Jul 18, 2010 5:14 pm

Update, this has been changed!
See http://www.phpbb.com/community/viewtopi ... #p12830302

Original reply:
No. Once the user has 'connected' via fb to your boards, anytime they are logged into fb and they return to your boards the fb js sets it's local cookie, then the hook automatically logs the user into your boards.

If the user is not logged into fb, both standard login and fb login buttons are available: if the user clicks on the fb login, fb prompts them to login, and the then the hook will automatically log them into the boards.
Last edited by Skinny Vinny on Sat Jul 24, 2010 7:03 pm, edited 1 time in total.

Danielx64
Registered User
Posts: 1369
Joined: Wed Nov 04, 2009 5:51 am
Location: In a server room in Australia
Name: Daniel
Contact:

Re: [ALPHA] Facebook graph/connect logins and registration

Post by Danielx64 » Sun Jul 18, 2010 10:34 pm

Will this mod auto create users so they don't need to fill out the reg form? In other words, get the username, email address and so on from facebook?
Please note that I will not be porting any of my mods to phpBB 3.1. Sorry for the inconvenience this may cause.
Image

Skinny Vinny
Registered User
Posts: 230
Joined: Tue Dec 01, 2009 7:10 pm

Re: [ALPHA] Facebook graph/connect logins and registration

Post by Skinny Vinny » Mon Jul 19, 2010 2:29 pm

Yes, this has already been setup. When a user connects via fb, the hook looks for an associated account, and if found automatically logs them in. If not, it then looks for an account with the same email address; if one is found, it creates the association and then logs them in. If no matches are found, it presents a screen to either login to their existing account (to link fb with existing users), or allow the user to create their account by submitting a username (option for anonymity). The hook creates the account with fb email address, fb timezone, fb pic as avatar (may change to option on registration, for anonymity), and valid submitted username.

If your board is set to require email validation on accounts, this hook skips it. With fb, addy had already been validated so we don't want to be forcing it again. The hook does not interfere with the admin activation of accounts if your board is set to require it.

The hook sets a randomly generated password on the account. Should a user that registered via fb wish to access their account via a standard login, they can reset the password through the boards native password reset.

I'll be back to working on completing this tonight, and should have a demonstration board opened up sometime tomorrow. If nothing arises in demonstration, I'll provide instructions and download for testing.

User avatar
darcie
Community Team Member
Community Team Member
Posts: 5541
Joined: Thu Jul 27, 2006 9:52 am
Location: Davis, California
Name: Darcie Griffin
Contact:

Re: [ALPHA] Facebook graph/connect logins and registration

Post by darcie » Mon Jul 19, 2010 2:52 pm

I am quite glad you are doing this and not me! I was looking at it all last week, but progressing slowly. Sounds like you are putting this together exactly the way it should be done with the new graph. Looking forward to seeing your implementation. :D
phpBB on Facebook | Site Rules | Former Community Team leader


Danielx64
Registered User
Posts: 1369
Joined: Wed Nov 04, 2009 5:51 am
Location: In a server room in Australia
Name: Daniel
Contact:

Re: [ALPHA] Facebook graph/connect logins and registration

Post by Danielx64 » Mon Jul 19, 2010 10:48 pm

I can't wait to test this, it been since late feb that we got a facebook connect that work :)
Please note that I will not be porting any of my mods to phpBB 3.1. Sorry for the inconvenience this may cause.
Image

superj707
Registered User
Posts: 1136
Joined: Thu Feb 26, 2009 12:20 am

Re: [ALPHA] Facebook graph/connect logins and registration

Post by superj707 » Tue Jul 20, 2010 3:00 pm

like the others have said OMFG!!!!!!!!!!!

you rock!

Skinny Vinny
Registered User
Posts: 230
Joined: Tue Dec 01, 2009 7:10 pm

Re: [ALPHA] Facebook graph/connect logins and registration

Post by Skinny Vinny » Tue Jul 20, 2010 6:14 pm

I'll have demonstration available later today.

The decission has been made: the custom association table is being removed from this hook, to be installed only when needed. This basic version enabled fb login and registration, for which no caching of fb data is required. Association is through an added field on the user table.

I need to cleanup/add language, and complete/test the ACP integration. I could do this during demonstration, but if I were to fault the script the board would go white screen, and nobody wants that lol.

Once comfortable in demonstration, I'll update topic to a beta and provide the download link for the hook and instructions.

Skinny Vinny
Registered User
Posts: 230
Joined: Tue Dec 01, 2009 7:10 pm

Re: [ALPHA] Facebook graph/connect logins and registration

Post by Skinny Vinny » Wed Jul 21, 2010 2:41 am

Ok, slight delay due to a massive brain fart on my part tonight.
ACP integration is completed, and the hook is now self installing and should be compatible with all supported databases (used the phpbb_db_tools class in includes/db/db_tools.php to add the user_svmods_fb_uid field to the user table).

I need to go back into the hook to implement the optional remote bouncer for the facebook avatars (still recommend admins use their own with the htaccess additions that I'll provide). Shouldn't be more than a few minutes.

I just need to complete some of the text used in the hook (again, will be configurable via lang files to override the defaults).

Once that little bit is done...
I'll strip my board back down, reinstall for testing, then let you guys have at it.

superj707
Registered User
Posts: 1136
Joined: Thu Feb 26, 2009 12:20 am

Re: [ALPHA] Facebook graph/connect logins and registration

Post by superj707 » Wed Jul 21, 2010 2:51 am

can't wait

User avatar
Chrono
Registered User
Posts: 71
Joined: Fri Jul 12, 2002 2:52 am
Location: Chihuahua México
Name: Alfonso Camacho
Contact:

Re: [ALPHA] Facebook graph/connect logins and registration

Post by Chrono » Wed Jul 21, 2010 3:52 am

Bookmarket :D cant wait to see how work :O

Chaox
www.degeneracionx.com - Anime, Games & Nothing Else.
Anime and Games Hispanic Community (Spanish only)
Sorry for my poor english

Locked

Return to “[3.0.x] Abandoned MODs”