Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Facebook Connect - Allow your users to login with their Facebook account Details »
Facebook Connect - Allow your users to login with their Facebook account
Mod Version: 2.0.5, by sllik (Member) sllik is offline
Developer Last Online: Dec 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.x Rating: (78 votes - 4.72 average) Installs: 499
Released: 10 Dec 2008 Last Update: 24 Mar 2009 Downloads: 6148
Not Supported DB Changes Uses Plugins Template Edits Additional Files Translations External Content  

Facebook Connect
This add-on allows your guests and existing users to login with their Facebook account through Facebook Connect.

WORKS WITH 3.8!

Benefits of Facebook Connect
  • Users can simply login with their Facebook account without going through the registration process.
  • Increase user interaction and your traffic through Facebook notifications and news-feeds!
Features
Facebook users will be able to receive Facebook notifications when:
  • There is a reply to their thread or a thread that they're subscribing to
  • They receive a new PM
News-Feed will be published on to the user's wall when the user:
  • Logs in for the first time
  • Replies to a thread
  • Creates a new thread
Fetch user data from Facebook
Fetch data like name, location, profile picture and use it on your forums! (NOTE: Some data may not be available for some users)

Automatically befriend user's friends
If any of the user's friends are also registered on the forum, they will automatically be friends!

How to Upgrade From 2.0.0 to 2.0.1
  • Upgrade the product. (Import the product XML again and set overwrite to yes).
  • Update Feed Template IDs in the settings (make sure they are the same as at: FB Connect Options -> News-Feed Templates)
How to Upgrade From 2.0.1 to 2.0.2
See UPGRADE.html
  • Fixed the notification problem (notifications were sent to wrong people)
  • Login button will now be displayed on vbAdvanced pages
How to Upgrade From 2.0.2 to 2.0.3
See UPGRADE.html
  • Fixed the Facebook avatar displayed for the wrong people problem.
  • Added Facebook UID & Profile URL field to data map.
Professional Install/Upgrade/Support Services
Want this mod professionally installed? It's guaranteed to work on your forum! Download the archive and see INSTALL.html/UPGRADE.html for more details!

Troubleshooting
Server Requirements:
PHP 5

If you get an error:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Means that there is something wrong with your callback URL. Your callback URL must be where xd_receiver.htm is; so when you enter [callbackurl]/xd_receiver.htm into your browser you should see a blank page (not a 404 page not found error or anything else).

If you get a continues this means there is a javascript error. Make sure you've done all the template edits correctly (especially footer & navbar). Clear your cache and reload the page.

If nothing happens when you click the Facebook Connect button make sure your callback url domain is the same as you forum domain (the one set in your forum settings) - more specifically make sure that there is a www (or isn't) in both domains.


Many more features may be implemented in the future so keep checking for updates.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	shot1.png
Views:	4316
Size:	103.3 KB
ID:	90376   Click image for larger version

Name:	shot2.png
Views:	6026
Size:	105.8 KB
ID:	90377   Click image for larger version

Name:	shot3.png
Views:	6894
Size:	139.5 KB
ID:	90378   Click image for larger version

Name:	shot4.png
Views:	6001
Size:	106.3 KB
ID:	91218  

Click image for larger version

Name:	shot5.png
Views:	5119
Size:	60.9 KB
ID:	91219  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #31  
Old 10 Dec 2008, 08:26
sllik sllik is offline
 
Join Date: Apr 2004
Originally Posted by dailyyeah View Post
Nice! I've been waiting for a mod like this to come out. Thanks!

Have you thought about creating a mod for myspace/open social integration as well? That would be amazing...
maybe at one point... don't forget to check for updates
Reply With Quote
  #32  
Old 10 Dec 2008, 08:31
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Very interesting!

How does the postbit of someone who posted with a facebook login look like? Username? Avatar?
Reply With Quote
  #33  
Old 10 Dec 2008, 08:34
sllik sllik is offline
 
Join Date: Apr 2004
Originally Posted by AlexanderT View Post
Very interesting!

How does the postbit of someone who posted with a facebook look like? Username? Avatar?
The user is asked to select a Nickname (username) when he/she logs in for the first time so it looks like any other postbit. Right now there is no way for others to distinguish between facebook users and non-facebook users.
Reply With Quote
  #34  
Old 10 Dec 2008, 08:40
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Originally Posted by sllik View Post
no it's not supported at the moment. and as for your infinite redirect problem, I've updated the fblogin.php file so please download the archive and reupload the file.
I will happily add to the paypal donation if you can figure out how to tie in established forum users with their facebook accounts.

the new fblogin.php file works beautifully.
__________________
Font Resizer 1.00 [vB3.5]
Panic Button 1.01 [vB3.07] [vB3.5]
Reply With Quote
  #35  
Old 10 Dec 2008, 08:41
macc's Avatar
macc macc is offline
 
Join Date: Feb 2008
nice - will test on my site ...

regards

macc
__________________

Welcome to Libar
Reply With Quote
  #36  
Old 10 Dec 2008, 10:02
pipedreams's Avatar
pipedreams pipedreams is offline
 
Join Date: Apr 2004
Real name: JP
Amazing add-on indeed - much thanks!

Originally Posted by dailyyeah View Post
Have you thought about creating a mod for myspace/open social integration as well? That would be amazing...
I agree and maybe use Google Friend Connect as that supports yahoo as well as openid - which I believe will support myspace as well?
Reply With Quote
  #37  
Old 10 Dec 2008, 10:14
Eneswar Eneswar is offline
 
Join Date: Dec 2005
I tried this on my test server but i get this error when i click connect with facebook:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #38  
Old 10 Dec 2008, 11:32
Wakey Wakey is offline
 
Join Date: Dec 2008
Real name: Simon Wakefield
Ok what am I doing wrong. I uploaded all the files, made the template changes and set it up in admin panel. However when I click the button to login with facebook it does nothing.

I even switched to the default theme and set that up and it still won't work
Reply With Quote
  #39  
Old 10 Dec 2008, 11:44
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Originally Posted by sllik View Post
The user is asked to select a Nickname (username) when he/she logs in for the first time so it looks like any other postbit. Right now there is no way for others to distinguish between facebook users and non-facebook users.
Ahh ok. So that nickname is then permanently tied to the person's facebook id?
Reply With Quote
  #40  
Old 10 Dec 2008, 12:03
jlew24asu jlew24asu is offline
 
Join Date: Nov 2006
can you help me with step 1?

Step 1:

Set up a new Facebook Application through which vBulletin and Facebook will be communicating. When setting up the application set the Callback URL to your vBulletin url. Set up a new Facebook Application here: http://www.facebook.com/developers/ (no coding skills required)

when trying to submit, I get

"You need to have at least 5 users before you can submit your application."

Last edited by jlew24asu; 10 Dec 2008 at 12:11.
Reply With Quote
  #41  
Old 10 Dec 2008, 12:45
Wakey Wakey is offline
 
Join Date: Dec 2008
Real name: Simon Wakefield
Ok I got my initial issue resolved. However now when I try and connect I get the following after I click the button and ok the facebook request

facebook == null) $vbulletin->facebook = new Facebook($vbulletin->options['fbconnect_apikey'], $vbulletin->options['fbconnect_secret']); $facebook = $vbulletin->facebook; $fbuid = intval($vbulletin->facebook->get_loggedin_user()); //$facebook->api_client->users_getInfo($fbuid, array('name')); if ($fbuid > 0) { $vbuser = $db->query_first(" SELECT userid FROM " . TABLE_PREFIX . "fbuser AS fbuser WHERE fbuid = " . $fbuid . " LIMIT 1 "); if ($vbuser['userid']) { $vbulletin->userinfo = $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, infractiongroupids, username, password, salt FROM " . TABLE_PREFIX . "user WHERE userid = '" . $vbuser['userid'] . "'"); if ($vbulletin->userinfo['username']) { //login vb user process_new_login('', false, ''); // do redirect do_login_redirect(); } else { $db->query_write("DELETE FROM " . TABLE_PREFIX . "fbuser WHERE fbuid = $fbuid"); $templatename = 'fbconnect_login'; } } else { //request username to create a new vb user $templatename = 'fbconnect_login'; } } else { eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], $vbulletin->session->vars['sessionurl']))); } if ($_POST['do'] == 'addmember') { $vbulletin->input->clean_array_gpc('p', array( 'username' => TYPE_STR )); if (!$vbulletin->options['allowregistration']) { eval(standard_error(fetch_error('noregister'))); } $fbuserinfo = $facebook->api_client->users_getInfo($fbuid, array('proxied_email')); $fbuserinfo = $fbuserinfo[0]; // init user datamanager class $userdata =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY); if ($vbulletin->options['moderatenewmembers']) { $newusergroupid = 4; } else { $newusergroupid = ((intval($vbulletin->options['fbconnect_defaultgroup']) > 0) ? $vbulletin->options['fbconnect_defaultgroup'] : 2); } $userdata->set('username', $vbulletin->GPC['username']); //generate random password $userdata->set('password', generate_password()); // set usergroupid $userdata->set('usergroupid', $newusergroupid); // set languageid $userdata->set('languageid', $vbulletin->userinfo['languageid']); // set user title $userdata->set_usertitle('', false, $vbulletin->usergroupcache["$newusergroupid"], false, false); // register IP address $userdata->set('ipaddress', IPADDRESS); $userdata->pre_save(); // check for errors if (!empty($userdata->errors)) { $_REQUEST['do'] = 'register'; $errorlist = ''; foreach ($userdata->errors AS $index => $error) { $errorlist .= "
$error"; } $username = htmlspecialchars_uni($vbulletin->GPC['username']); $show['errors'] = true; } else { $show['errors'] = false; $userdata->set('email', $fbuserinfo['proxied_email']); // save the data $vbulletin->userinfo['userid'] = $userid = $userdata->save(); if ($userid) { //map fbuser to vbuser $db->query_write(" INSERT INTO " . TABLE_PREFIX . "fbuser (fbuid, userid) VALUES (" . $fbuid . ", " . intval($userid) . ") "); $vbulletin->userinfo['fbuid'] = $userid; $userinfo = fetch_userinfo($userid); $userdata_rank =& datamanager_init('User', $vbulletin, ERRTYPE_SILENT); $userdata_rank->set_existing($userinfo); $userdata_rank->set('posts', 0); $userdata_rank->save(); // force a new session to prevent potential issues with guests from the same IP, see bug #2459 require_once(DIR . '/includes/functions_login.php'); $vbulletin->session->created = false; process_new_login('', false, ''); //post news-feed if ($vbulletin->options['fbconnect_firstlogintemplateid']) { $tokens = array( 'bbtitle' => $vbulletin->options['bbtitle'], 'bburl' => $vbulletin->options['bburl'], 'images' => array() ); try { $vbulletin->facebook->api_client->feed_publishUserAction($vbulletin->options['fbconnect_firstlogintemplateid'], $tokens, '', '', 1); } catch(FacebookRestClientException $ex) { } } //find friends and add to friend's list $friends = $facebook->api_client->friends_get(); $vbfriends = $db->query_read(" SELECT user.userid FROM " . TABLE_PREFIX . "user AS user, " . TABLE_PREFIX . "fbuser AS fbuser WHERE fbuser.fbuid IN (" . implode(',', $friends) . ") AND user.userid = fbuser.userid "); while ($friend = $db->fetch_array($vbfriends)) { $db->query_write(" INSERT IGNORE INTO " . TABLE_PREFIX . "userlist (userid, relationid, type, friend) VALUES (" . intval($userid) . ", " . $friend['userid'] . ", 'buddy', 'yes') "); } $username = $vbulletin->GPC['username']; $email = $fbuserinfo['proxied_email']; // send new user email if ($vbulletin->options['newuseremail'] != '') { $ipaddress = IPADDRESS; eval(fetch_email_phrases('newuser', 0)); $newemails = explode(' ', $vbulletin->options['newuseremail']); foreach ($newemails AS $toemail) { if (trim($toemail)) { vbmail($toemail, $subject, $message); } } } if ($newusergroupid == 2) { if ($vbulletin->options['welcomemail']) { eval(fetch_email_phrases('welcomemail')); vbmail($email, $subject, $message); } } $vbulletin->url = str_replace('"', '', $vbulletin->url); if (!$vbulletin->url) { $vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q']; } else { $vbulletin->url = iif(strpos($vbulletin->url, 'register.php') !== false, $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'], $vbulletin->url); } if ($vbulletin->options['moderatenewmembers']) { eval(standard_error(fetch_error('moderateuser', $username, $vbulletin->options['forumhome'], $vbulletin->session->vars['sessionurl_q']), '', false)); } else { eval(standard_error(fetch_error('registration_complete', $username, $vbulletin->session->vars['sessionurl'], $vbulletin->options['bburl'] . '/' . $vbulletin->options['forumhome'] . '.php'), '', false)); } } } } eval('print_output("' . fetch_template($templatename) . '");');
Reply With Quote
  #42  
Old 10 Dec 2008, 12:51
KevinL KevinL is offline
 
Join Date: Apr 2005
This is pretty awesome
Reply With Quote
  #43  
Old 10 Dec 2008, 12:53
digitalnorte digitalnorte is offline
 
Join Date: Jan 2008
God ! Good Job, Excellent JOB !
IŽll see more to integrate with my VB and tell you.
Reserved but Installing in a near time.
Congrats !
Reply With Quote
  #44  
Old 10 Dec 2008, 12:57
macc's Avatar
macc macc is offline
 
Join Date: Feb 2008
hello!

have installed and have one problem ...when user (facebook user) will login on my vbulletin and must write username - he/she get database error -


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

some help or solutinos?

regards

macc

edit: after this error - user come to forum - made new usergroup for this users.
call back url is http://libar-libar.com/libar/vb/ and connections works ...
__________________

Welcome to Libar

Last edited by macc; 10 Dec 2008 at 13:20.
Reply With Quote
  #45  
Old 10 Dec 2008, 13:41
tidefans tidefans is offline
 
Join Date: Jul 2004
Originally Posted by yinyang View Post
I will happily add to the paypal donation if you can figure out how to tie in established forum users with their facebook accounts.
Same here. Looks like a great mod.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 15:36.

Layout Options | Width: Wide Color: