The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
Facebook Connect - Allow your users to login with their Facebook account Details »» | |||||||||||||||||||||||||||
Facebook Connect - Allow your users to login with their Facebook account
Developer Last Online: Dec 2011
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
Facebook users will be able to receive Facebook notifications when:
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
See UPGRADE.html
See UPGRADE.html
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: Code:
The Facebook Connect cross-domain receiver URL http://www.SITEURL.com/xd_receiver.h...%220.699%22%7D must have the application's callback URL http://www.SITEURL.com/forums/ as a prefix. You can configure the callback URL in the application's settings. 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. Show Your Support
|
Comments |
#1352
|
||||
|
||||
Quote:
|
#1353
|
||||
|
||||
I'm also getting the long error message when I try to log in. I click the button, I get the login div, and then I click login and:
Code:
# facebook == null) $vbulletin->facebook = new Facebook($vbulletin->options['fbconnect_apikey'], $vbulletin->options['fbconnect_secret']); $facebook = $vbulletin->facebook; $fbuid = intval($vbulletin->facebook->get_loggedin_user()); 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']) { //set coockies vbsetcookie('userid', $vbulletin->userinfo['userid'], true, true, true); vbsetcookie('password', md5($vbulletin->userinfo['password'] . COOKIE_SALT), true, true, true); //login vb user process_new_login('', true, ''); $path_parts = pathinfo(parse_url($vbulletin->url, PHP_URL_PATH)); if ($path_parts['basename'] == 'fblogin.php') $vbulletin->url = $vbulletin->options['forumhome'] . '.php'; // do redirect if (!is_array($vbphrase)) $vbphrase = array(); 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 ($_GET['do'] == 'login') { $templatename = 'fbconnect_loginform'; } 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 IGNORE INTO " . TABLE_PREFIX . "fbuser (fbuid, userid) VALUES (" . $fbuid . ", " . intval($userid) . ") "); $friendcount = 0; if ($vbulletin->options['fbconnect_importfriends']) { //find friends and add to friend's list $friends = $facebook->api_client->friends_get(); if (is_array($friends) && count($friends) > 0) { $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') "); $friendcount++; } } } $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->set('friendcount', $friendcount); $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) { } } */ $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) . '");'); |
#1354
|
||||
|
||||
Installed without a hitch - Nice Mod - Thanks!
|
#1355
|
||||
|
||||
Quote:
Quote:
|
#1356
|
|||
|
|||
Quote:
Please. |
#1357
|
||||
|
||||
great mod! thanks for this one.
|
#1358
|
||||
|
||||
is there a way to turn off that popup that asks if you want to publish this to facebook, everytime one of my users posts a reply on my forum?
|
#1359
|
|||
|
|||
Hey guys - just posted in the facebook connect 3.8,
I did a bit more research on Rpxnow.com and found it to have the same capabilities as facebook connect (including the publishing to news feeds etc) but with many other more login options as well (myspace, yahoo, google, twitter, etc). I just installed the WP plugin for this and it works great. There is currently no VB plugin but we can ask them to make one at the link below. I have already started the request and all you have to do is go and vote for it so we can get it to the top. Users did the same for drupal and joomla and rpx is now creating a plug in. It would be an amazing addition to vbulletin. You can vote (without registering) here: https://rpx.uservoice.com/pages/8895-general Look for the request titled "Make a vbulletin plugin" and vote. |
#1360
|
|||
|
|||
it is not working ....... I cant see anything in my forum..... should there be any logo to connect?
|
#1361
|
|||
|
|||
Quote:
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|