vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Integration with vBulletin - Facebook Connect - Allow your users to login with their Facebook account (https://vborg.vbsupport.ru/showthread.php?t=198499)

3DSJFH 01-24-2009 09:12 AM

I was hoping sllik or somebody else could attend my question?

Everything in the install process seems straight forward enough, however making numerous manual modifications to the templates is kind of a bad idea for when you try to update your vB version.

Do you plan to offer an alternative to this? Other add-ons I think use the hook system to avoid this from happening.

Thank you.

zorag 01-24-2009 09:29 AM

I'm having a major issue here, since installing this mod I can't post correctly.

When creating a thread I get:

Quote:

The following errors occurred with your submission:

1. The message you have entered is too short. Please lengthen your message to at least 10 characters.
Although it's more, and if I use the Quick Reply form I get:

Quote:

Please click one of the Quick Reply icons in the posts above to activate Quick Reply.
This is only with FireFox? Can anyone else try please http://earner.net

Thanks

sllik 01-24-2009 04:04 PM

Quote:

Originally Posted by sdsvtdriver (Post 1723096)
I installed this mod and it works well on the first try. Good job! A couple of questions...



I have the same issue. I logged in with my account with no Facebook picture. I then had friend test the login and his avatar came up. He then changed his avatar. Then, I noticed in posts that I had his old avatar associated with my posts. This is a bug.

fixed!

Quote:

Originally Posted by 3DSJFH (Post 1723132)
I was hoping sllik or somebody else could attend my question?

Everything in the install process seems straight forward enough, however making numerous manual modifications to the templates is kind of a bad idea for when you try to update your vB version.

Do you plan to offer an alternative to this? Other add-ons I think use the hook system to avoid this from happening.

Thank you.

There is no alternative right now.

Quote:

Originally Posted by zorag (Post 1723141)
I'm having a major issue here, since installing this mod I can't post correctly.

When creating a thread I get:



Although it's more, and if I use the Quick Reply form I get:



This is only with FireFox? Can anyone else try please http://earner.net

Thanks

please see a few posts before... make sure you did all the template edit correctly especially newreply, SHOWTHREAD and newthread. Also go to FB Connect settings and save them (even if you didn't make any changes).

sllik 01-24-2009 05:36 PM

Fixed the bug where wrong avatars (imported from facebook) are being displayed.
Added the request Facebook UID & Profile URL field to the data map.

Taken this mod out from Beta stage.

Enjoy!

fattony69 01-24-2009 05:54 PM

Is it possible that this mod can have auto-template edits?

sllik 01-24-2009 06:08 PM

auto template edits always have problems IMO.

Vaupell 01-24-2009 06:46 PM

tagged but waiting.. using 3.8.0 want to see more succesfully install and use :D

Brandon Sheley 01-24-2009 08:23 PM

Just wanted to say I finally installed this and it works great :)

thanks

ps.. that's on a 3.8 board. Transform Topeka Forum

kursed 01-24-2009 08:36 PM

How do I assign a Facebook account to a different VB account? I've set my own Facebook account to link with a test VB account, but would like it linked to my main account.

Mum 01-24-2009 10:37 PM

Quote:

Originally Posted by sllik (Post 1682141)
Sorry, this add-on only supports PHP5 for now...

ANy chance of doing this for PHP4?

sdsvtdriver 01-25-2009 12:46 AM

Quote:

Originally Posted by sllik (Post 1723419)
fixed!

Thanks! I updated to 2.0.3 today!

Any thoughts on adding an exclusion to certain forums (admin, etc.) so it doesn't update the newsfeed?

Brandon Sheley 01-25-2009 01:43 AM

Quote:

Originally Posted by sdsvtdriver (Post 1723829)
Thanks! I updated to 2.0.3 today!

Any thoughts on adding an exclusion to certain forums (admin, etc.) so it doesn't update the newsfeed?

I would like this as well.
like private forums that wouldn't need to be posted on the news feed :D

updated with no problems

peppy 01-25-2009 02:01 AM

Hi

I just installed 2.0.3 and I get a whole page of SQL appear as text when I try and map the fields

query_first(" SELECT fbuid FROM " . TABLE_PREFIX . "fbuser WHERE userid = " . $userid . " LIMIT 1 "); return intval($user['fbuid']); } function fetch_fbuser_info($query) { require_once(DIR . '/includes/facebook/facebook.php'); global $vbulletin, $db; $fbusers = $db->query_read($query); $fbuids = ""; $vbuids = array(); while ($fbuser = $db->fetch_array($fbusers)) { if ($fbuser['fbuid']) { $fbuids .= $fbuser['fbuid'] . ","; $vbuids[] = $fbuser['userid']; } } $fbuids = rtrim($fbuids, ','); $fbuserinfo = $vbulletin->session->vars['fbuserinfo']; if ($vbulletin->facebook == null) $vbulletin->facebook = new Facebook($vbulletin->options['fbconnect_apikey'], $vbulletin->options['fbconnect_secret']); try { $fbuser = $vbulletin->facebook->api_client->users_getInfo($fbuids, 'name, first_name, last_name, affiliations, pic, pic_small, pic_square'); for ($i = 0; $i < count($fbuser); $i++) $fbuserinfo[$vbuids[$i]] = $fbuser[$i]; $v

etc..

indie2industry 01-25-2009 08:11 AM

Wow!!! Insane!! Works Perfectly!!

Hex_legend 01-25-2009 03:03 PM

Im having a weird problem.

I have set it all up now, so its working apart from one thing.

I have vBA installed and anyone who is a member of the facebook group cannot view the main page due to "usergroup permissions" (which is vba)

I have set all the usergroup permissions.

I am running 3.7.4

sllik 01-25-2009 04:17 PM

Quote:

Originally Posted by peppy (Post 1723859)
Hi

I just installed 2.0.3 and I get a whole page of SQL appear as text when I try and map the fields

query_first(" SELECT fbuid FROM " . TABLE_PREFIX . "fbuser WHERE userid = " . $userid . " LIMIT 1 "); return intval($user['fbuid']); } function fetch_fbuser_info($query) { require_once(DIR . '/includes/facebook/facebook.php'); global $vbulletin, $db; $fbusers = $db->query_read($query); $fbuids = ""; $vbuids = array(); while ($fbuser = $db->fetch_array($fbusers)) { if ($fbuser['fbuid']) { $fbuids .= $fbuser['fbuid'] . ","; $vbuids[] = $fbuser['userid']; } } $fbuids = rtrim($fbuids, ','); $fbuserinfo = $vbulletin->session->vars['fbuserinfo']; if ($vbulletin->facebook == null) $vbulletin->facebook = new Facebook($vbulletin->options['fbconnect_apikey'], $vbulletin->options['fbconnect_secret']); try { $fbuser = $vbulletin->facebook->api_client->users_getInfo($fbuids, 'name, first_name, last_name, affiliations, pic, pic_small, pic_square'); for ($i = 0; $i < count($fbuser); $i++) $fbuserinfo[$vbuids[$i]] = $fbuser[$i]; $v

etc..

double check your server settings... this is php code not mysql... you should never see this.

Quote:

Originally Posted by indie2industry (Post 1724043)
Wow!!! Insane!! Works Perfectly!!

:)

Quote:

Originally Posted by Hex_legend (Post 1724308)
Im having a weird problem.

I have set it all up now, so its working apart from one thing.

I have vBA installed and anyone who is a member of the facebook group cannot view the main page due to "usergroup permissions" (which is vba)

I have set all the usergroup permissions.

I am running 3.7.4

i danno man... seems like a permission issue... you can try and change the default user group for facebook users (in the FB Connect Settings).

Blackhat 01-25-2009 04:24 PM

what about msn connect? :)

sllik 01-25-2009 04:35 PM

Quote:

Originally Posted by Blackhat (Post 1724391)
what about msn connect? :)

lol sorry not yet :)

Hex_legend 01-25-2009 06:53 PM

Any plans to do the instant messenger that facebook has?

Sllik, could you please PM me? I had an idea about a new add-on =]

Blackhat 01-26-2009 08:57 AM

when those guests logs in using facebook, are those accounts just temporary or permanent ?

sdsvtdriver 01-26-2009 09:38 AM

Quote:

Originally Posted by Blackhat (Post 1725020)
when those guests logs in using facebook, are those accounts just temporary or permanent ?

Permanent. It creates an account in your forum's db.

Blackhat 01-26-2009 09:41 AM

Great :)

dxlwebs 01-26-2009 09:42 AM

any ideas on mine silikyou told me to email it to you and i did butyet still no reply

Blackhat 01-26-2009 10:08 AM

I get this when I login and nothing more
Quote:

# 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_comp lete', $username, $vbulletin->session->vars['sessionurl'], $vbulletin->options['bburl'] . '/' . $vbulletin->options['forumhome'] . '.php'), '', false)); } } } } eval('print_output("' . fetch_template($templatename) . '");');

indie2industry 01-26-2009 10:40 AM

Quote:

Originally Posted by sllik (Post 1724403)
Quote:

Originally Posted by Blackhat (Post 1724391)
what about msn connect? :)

lol sorry not yet :)

But it would be crazy if there was a GOOGLE connect... Where you could use your google/gmail account to register/log-in..

This may be next to impossible but I had to mention it..



Oh yeah, once I get my tax return I'm DEFINITELY sending a donation. I think everyone should do the same...

Shaliza 01-26-2009 10:46 AM

This is a great mod, but when I think about it, do you think that many people will put their info in there even though many people phish accounts? They may decide to be cautious.

Digital Jedi 01-26-2009 12:54 PM

Quote:

Originally Posted by Shaliza (Post 1725083)
This is a great mod, but when I think about it, do you think that many people will put their info in there even though many people phish accounts? They may decide to be cautious.

Their just logging into FaceBook just like they would ordinarily. This just bridges it with your forum.

Digital Jedi 01-26-2009 12:55 PM

Quote:

Originally Posted by GigaSb (Post 1722203)
i found the scrolling problem.

ONLY when i remove:

<!-- fbconnect -->
$fbconnect_init
<!-- / fbconnect -->

from the footer, the scrolling is gone..
but then the script give me continues loading image.

the question is whats common between Lang Hebrew2 and footer?
Jedi, i thought about something.. where is another place besides footer that i can place it to work ?

Did you try moving the code someplace else in your footer?

Hex_legend 01-26-2009 01:12 PM

I have been asked by a lot of my members to do a feature where they can invite their facebook friends,
how easy is this if we use fb connect?
Does anyone know how to do this?

Spooony 01-26-2009 03:50 PM

Quote:

Originally Posted by Mum (Post 1723770)
ANy chance of doing this for PHP4?

I don't think there's anything he can do because it's down to how Facebook works.

You're usually able to easily upgrade to PHP5 through cPanel (or whatever you use for your server).

That's all I did to solve the problem (as I said before).

Spooony 01-26-2009 03:51 PM

Quote:

Originally Posted by Hex_legend (Post 1725164)
I have been asked by a lot of my members to do a feature where they can invite their facebook friends,
how easy is this if we use fb connect?
Does anyone know how to do this?

What I did was just set up a Facebook group for your site and invite people to that group.

tpearl5 01-26-2009 04:08 PM

Quote:

Originally Posted by Hex_legend (Post 1725164)
I have been asked by a lot of my members to do a feature where they can invite their facebook friends,
how easy is this if we use fb connect?
Does anyone know how to do this?

I created a file called fb_invite.php. You can see it in action here: http://cellphoneforums.net/fb_invite.php (note that it is uploaded to my forum root)

I haven't tested this fully yet. Make sure under "canvas" on your facebook setting you have it set to FBML. I haven't gotten around getting the canvas page to display correctly either, but that shouldn't matter since you are redirecting the user to your forum home.

You could add a conditional to your pages that say 'if facebook user, display 'invite friends'.

Hex_legend 01-26-2009 04:44 PM

Seems to work for me.
Gutted that you can only invite 16 users at a time
www.thesocialmeet.com/fb_invite.php

usearchme 01-26-2009 05:26 PM

Hi there

I seem to have a problem with my installation

I get to this section on the installation

Step 5:
Go to FB Connect Options > News-Feed Templates and register default templates. Then Go to FB Connect Options > Settings and save your settings (even if you don't change anything).

When i goto news feed templates i get this error

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/sites/worldofchat.co.uk/public_html/Forum/includes/facebook/facebook.php on line 38

Help lol !

Ive also got an error on my forums now double help http://www.worldofchat.co.uk/Forum

Woc

monkeywarplane 01-26-2009 05:52 PM

Quote:

Originally Posted by Hex_legend (Post 1725366)
Seems to work for me.
Gutted that you can only invite 16 users at a time
www.thesocialmeet.com/fb_invite.php

Great little addition. I want to add this on too, but when I attempt to skip the step (not invite anyone), it just flashes and goes back to the screen (does not allow me to skip).

I tried both socialmeet and http://cellphoneforums.net/fb_invite.php - same result.

Stuart

tpearl5 01-26-2009 06:58 PM

Quote:

Originally Posted by monkeywarplane (Post 1725423)
Great little addition. I want to add this on too, but when I attempt to skip the step (not invite anyone), it just flashes and goes back to the screen (does not allow me to skip).

I tried both socialmeet and http://cellphoneforums.net/fb_invite.php - same result.

Stuart

I just modified it to redirect to forum home on skip. I think it will still invite properly. https://vborg.vbsupport.ru/showpost....postcount=1072

monkeywarplane 01-26-2009 08:33 PM

Quote:

Originally Posted by tpearl5 (Post 1725497)
I just modified it to redirect to forum home on skip. I think it will still invite properly. https://vborg.vbsupport.ru/showpost....postcount=1072


Great. Just added it to mine, seems to be working well.

http://forums.interbasket.net/fb_invite.php

Stuart

sdsvtdriver 01-27-2009 03:37 AM

interesting... suddenly, it has stopped sending updates to my Facebook account.

The settings are set to 'prompt me before posting' but when I post on my forum, I am not being prompted...

not sure if this is related to the 2.0.3 update or not.

plumbingskool 01-27-2009 06:39 AM

Hi,

I just added this and I am having trouble understanding some things:

I have read and saw that you have to merge new users with existing to merge account, that part I get.

But lets say I create a new member or login with my facebook account that is not connected to my forum yet and then I do the bridge.

I have done this and I get no code errors BUT when I make a new post and such I don't see this feature working like in the screenshot..

Can anyone tell me what I am doing wrong?

I mean everything works, like I said no code errors or log in errors but seems features are missing for me unless I missed something, I read the install.html a bunch of time,.

Also has there been any other work around to the forum full of people and then them wanting to connect their accounts or is the "merge user" still the best option?

Thanks in advance for your support and feedback, here is a screenshot of the feature I dont see

https://vborg.vbsupport.ru/attachmen...9&d=1230318383

maroceve 01-27-2009 11:20 AM

Guys, i have a database error when i enter any discussion on my board.

Everything else works perfectly...any ideas ?

i have VBSEO ..can that be it ?


Database error in vBulletin 3.7.1:

Invalid SQL:

SELECT fbuid
FROM fbuser
WHERE userid =
LIMIT 1;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 4
Error Number : 1064
Request Date : Tuesday, January 27th 2009 @ 08:14:40 AM
Error Date : Tuesday, January 27th 2009 @ 08:14:40 AM
Script : http://www.maroceve.com/forums/artis...abat-sale.html
Referrer : http://www.maroceve.com/forums/forum39/
IP Address : 81.192.184.75
Username : EzFacebook
Classname : vB_Database
MySQL Version :


All times are GMT. The time now is 12:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02622 seconds
  • Memory Usage 1,870KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (24)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete