vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Integration with vBulletin - Facebook Connect - Update for Facebook PHP SDK (v.3.0.0) (https://vborg.vbsupport.ru/showthread.php?t=270219)

Morrus 09-23-2011 03:53 PM

Quote:

Originally Posted by unp (Post 2249314)
Put '$fbconnect_button' above <if condition="$show['member']", else it won't show to guests.

Ah, that seems to have done the trick.

The instructions read:

Quote:

Originally Posted by Instructions
Find the first:
<if condition="$show['member']">

Insert After:
<!-- fbconnect -->
$fbconnect_button
<!-- / fbconnect -->

So they may need to be altered slightly. :)

Morrus 09-23-2011 04:07 PM

Quick question - are FB users counted in the registered member count?

mtbikemike 09-23-2011 04:16 PM

1 Attachment(s)
Quote:

Originally Posted by SocialNetworkBuzz (Post 2249142)
Yeap - https://apps.facebook.com/vbfourtest/

As you'll see, you get the pop up for app connection permission. But after agreeing, it doesn't log you in and anytime you click the fb connect button again, nothing happens. But if you go to https://socialnetwork.bz/vb4/ the button works fine. So it is only within canvas not working.

In your clientscript/vbulletin_facebook.js file find the vB_Facebook.prototype.do_fbRedirect function block. Replace it with this ...

Code:

vB_Facebook.prototype.do_fbRedirect = function() {
    var A = window.location.href.replace(/#.*/, "");
    var B = (window.location.search.substring(1) ? "&" : "?");
    window.location = A + B + "dofbredirect=1" + window.location.hash
};


The original function was calling window.top.location which will throw the error ...
Code:

Unsafe JavaScript attempt to access frame with URL http://apps.facebook.com/vbfourtest/ from frame with URL https://socialnetwork.bz/vb4/forum.php. Domains, protocols and ports must match.
I have no way to test, so I'm hoping it'll work. Let m know :)


Edit: I just realized the vbulletin_facebook.js file is obfuscated. Try running with the attached file (make sure to remove the ".txt" in the filename)

mtbikemike 09-23-2011 04:18 PM

Quote:

Originally Posted by Morrus (Post 2249309)
I didn't modify any of your templates - just followed the instructions exactly.

Viewing the source, there's no reference to fbconnect.png at all.

It shows up perfectly when I'm logged in; everything else seems to be working OK. Just nothing when visiting as a guest. Nothing on register.php, either.



I understand what's supposed to happen. Only.... it's not. :)

The instructions say to put the button after <if condition="$show['member']">

I'm not an expert, but if that's a conditional of some kind, is it perhaps telling it not to display?


Ooops! My bad. The documentation should say BEFORE the <if condition="$show['member']">

Thanks UNP for pointing this out. :o

mtbikemike 09-23-2011 04:23 PM

Quote:

Originally Posted by Taringa! CS (Post 2249207)
After a couple of hours first time you load a forum's page i'm getting the facebook connect image, after reloading page everything it's fine as it should be.

--

Yesterday i cleaned up cookies, and today after loging in i (using vbulletin login) the facebook connect image never shows up as a connected user

Could it be my poor documentation? :o

Check this post ...
https://vborg.vbsupport.ru/showpost....0&postcount=84

mtbikemike 09-23-2011 04:37 PM

Thanks to everyone for putting up with these errors/bugs and helping test. I'm hoping to get this rock solid very shortly, then I'll be able to start adding more interesting features :)

PS - I saw Zuckerburg's presentation at F8 on FB timelines and Open Graph's new action types, object types and aggregation features last night. Looks like it'll be acceptable to start posting when users log in/out of vb, what threads they're reading, etc. What other features would you like to see?

Morrus 09-23-2011 04:40 PM

Quote:

Originally Posted by mtbikemike (Post 2249330)

PS - I saw Zuckerburg's presentation at F8 on FB timelines and Open Graph's new action types, object types and aggregation features last night. Looks like it'll be acceptable to start posting when users log in/out of vb, what threads they're reading, etc. What other features would you like to see?

The big one for me would be to take advantage of the new "Lists" functionality on FB so that you can choose who sees your auto-wall posts (so as not to spam, say, my mother with posts about a website she doesn't understand).

Of course, it's easy to log in to Facebook and edit the post in question, but being able to set that permanently would be awesome.

Morrus 09-23-2011 08:29 PM

OK, we have a couple of major site-stopper bugs.

1) When you use a Quick Reply, the board substitutes the usual Quick Reply text "Please click one of the Quick Reply icons...". The only way to post now is a quick reply followed immediately by an Edit.

2) Frequent occurences of "The message you have entered is too short. Please lengthen your message to at least 3 characters."

Either of these are site-killers; both are pretty devastating. :)

Also, this from a user:

---- I clicked on the FB connect button, clicked yes on the FB "allow this page access" and then was logged out of EN World and logged in as a different user (nedjer specifically) without inputting a password.

Eeek.

Morrus 09-23-2011 10:26 PM

Update - I asked for browsers and versions. The above is happening on IE6, iE8, and FF6 at minimum (probably more). New posts are down to under 10% normal, so it's clearly widespread.

I'm uninstalling for now, for obvious reason (can't afford it!)

Taringa! CS 09-23-2011 10:49 PM

Quote:

Originally Posted by Taringa! CS (Post 2249207)
After a couple of hours first time you load a forum's page i'm getting the facebook connect image, after reloading page everything it's fine as it should be.

--

Yesterday i cleaned up cookies, and today after loging in i (using vbulletin login) the facebook connect image never shows up as a connected user

Any hint on this mtbikemike ?

Thanks

Taringa! CS 09-23-2011 10:51 PM

3.0.3 attach it's missing :D

SocialNetworkBuzz 09-24-2011 05:20 AM

The button is now clickable, but after it connects to FB, logging in now crashes safari browser. On Camino, it still doesn't click.

mtbikemike 09-24-2011 12:43 PM

Quote:

Originally Posted by SocialNetworkBuzz (Post 2249491)
The button is now clickable, but after it connects to FB, logging in now crashes safari browser. On Camino, it still doesn't click.

This only happens on the canvas app? Or the straight vB?

Taringa! CS 09-24-2011 01:51 PM

mike can u help me?

JohorBahru 09-24-2011 02:47 PM

hi, does this work or any changes required after f8?

mtbikemike 09-24-2011 03:00 PM

Quote:

Originally Posted by Taringa! CS (Post 2249436)
3.0.3 attach it's missing :D

Found a bug in 3.0.3... pulled it. I should have 3.0.4 ready in about an hour.

mtbikemike 09-24-2011 03:07 PM

Quote:

Originally Posted by Taringa! CS (Post 2249556)
mike can u help me?

sure, what's up?

Taringa! CS 09-24-2011 04:21 PM

This

Quote:

Originally Posted by Taringa! CS (Post 2249207)
After a couple of hours first time you load a forum's page i'm getting the facebook connect image, after reloading page everything it's fine as it should be.

--

Yesterday i cleaned up cookies, and today after loging in i (using vbulletin login) the facebook connect image never shows up as a connected user

Thanks!

mtbikemike 09-24-2011 04:41 PM

Quote:

Originally Posted by Taringa! CS (Post 2249615)
This

Thanks!


Facebook cookies and vb cookies get all convoluted when testing. It makes it worse that sometimes FB doesn't clear out its cookies when logging out. Working on a fix now.

Hellmaster 09-24-2011 10:56 PM

Quote:

Originally Posted by mtbikemike (Post 2248203)
What version of php are you running? 3.0.1 has a fix for php versions < 5.3.

It's 5.2.17

Thanks for reply, hope you can help me!:)

Taringa! CS 09-24-2011 11:18 PM

Quote:

Originally Posted by mtbikemike (Post 2249626)
Facebook cookies and vb cookies get all convoluted when testing. It makes it worse that sometimes FB doesn't clear out its cookies when logging out. Working on a fix now.

Great! Waiting that fix

Thanks for your work

mtbikemike 09-25-2011 01:32 AM

Tore apart the code and debugged all day long. There's a weird bug in the persistent cookie that Facebook sets which make logging out randomly break. This in turn shows the user's avatar when they are in fact logged out. I have a fix, but it's going to take a while to remove all the debugging hooks and piece the code and templates back together.

Aiming for sometime tomorrow.

mtbikemike 09-26-2011 01:40 AM

Just released 3.0.4 and it's looking pretty solid on my machine. Had to flip the code to rely on javascript for FB logged in status. This should speed things up a bit. But then again, might cause problems on lower end browsers or sites with a ton of javascript and external references.

See the change log for details on what's new.

A working demo can be tested out here.

Thanks in advance for any bug reports. :)

unp 09-26-2011 07:35 AM

3.0.4 Not working for me, Firebug showing this error message:

Quote:

FB.provide is not a function
all.js()all.js (line 4)
[Break On This Error] FB.provide('Array',{indexOf:function(a...ength;c<d ;c++)a[c]=b[c];return a;}});

Morrus 09-26-2011 01:18 PM

Quote:

Originally Posted by mtbikemike (Post 2250083)
Just released 3.0.4 and it's looking pretty solid on my machine. Had to flip the code to rely on javascript for FB logged in status. This should speed things up a bit. But then again, might cause problems on lower end browsers or sites with a ton of javascript and external references.

See the change log for details on what's new.

A working demo can be tested out here.

Thanks in advance for any bug reports. :)

The button doesn't work for me on your demo site.

Edit - scratch that. It does now.

mtbikemike 09-26-2011 01:48 PM

ooops. forgot to move some code into the plugin. I re-uploaded 3.0.4 with the fix below.


Add to to top of parse_templates hook ...
Code:

// make sure the fbuid = 0 when there is a new session
$vbulletin->session->vars['fbuid'] == null ? 0 : $vbulletin->session->vars['fbuid'];


mtbikemike 09-26-2011 01:54 PM

Quote:

Originally Posted by unp (Post 2250128)
3.0.4 Not working for me, Firebug showing this error message:

Most likely caused by a null session var. Check my previous message on how to fix.

If the fix doesn't work, let me know what version of FF you're using.

mtbikemike 09-26-2011 01:55 PM

Quote:

Originally Posted by JohorBahru (Post 2249579)
hi, does this work or any changes required after f8?

Should work fine. No changes needed after F8, but a lot of interesting possibilities.

See forums.carreview.com for a live demo.

mtbikemike 09-26-2011 01:58 PM

Quote:

Originally Posted by Hellmaster (Post 2249735)
It's 5.2.17

Thanks for reply, hope you can help me!:)

I developed it using 5.3, but the latest release of the plugin should run okay on 5.2.

Taringa! CS 09-26-2011 02:13 PM

After upgrading to 3.0.4 i've got some problems like

*) I'm logged in and i can login using facebook
*) I'm logged out and after trying to login using fb button wrong username/password error it's shown

mtbikemike 09-26-2011 05:03 PM

Quote:

Originally Posted by Taringa! CS (Post 2250213)
After upgrading to 3.0.4 i've got some problems like
*) I'm logged in and i can login using facebook

If you close the browser after logging in with FB connect, when you reopen it, it won't be connected anymore. I'm saving the connect status in the vb session object, but it looks like the vb session object needs to know about plugin variables. I'll work on a fix for this.


Quote:

Originally Posted by Taringa! CS (Post 2250213)
After upgrading to 3.0.4 i've got some problems like

*) I'm logged out and after trying to login using fb button wrong username/password error it's shown

The only way you can get this error is if you go to fblogin.php and the code can't get your FB User ID (either because the FB cookie wasn't set or you typed that url in directly).

Taringa! CS 09-26-2011 05:24 PM

Quote:

Originally Posted by mtbikemike (Post 2250274)
If you close the browser after logging in with FB connect, when you reopen it, it won't be connected anymore. I'm saving the connect status in the vb session object, but it looks like the vb session object needs to know about plugin variables. I'll work on a fix for this.

Ok, waiting for the fix because i've already connected my facebook to my vb account and on forums i can't see that conection

Quote:

Originally Posted by mtbikemike (Post 2250274)
The only way you can get this error is if you go to fblogin.php and the code can't get your FB User ID (either because the FB cookie wasn't set or you typed that url in directly).

Even i'm logged in or out, i'm getting this error when clicking on facebook button!

Morrus 09-26-2011 06:08 PM

1 Attachment(s)
OK, just installed the latest version.

I haven't had chance to test it fully yet, but there's some odd stuff going on with tables or something in the navbar which didn't happen in the 3.02 version. The button seems to be contained to the top half of a table cell or something. Screenshot attached.

Pressing the button simply takes me to the "Thank you for logging in, Morrus" interrupt screen, and then takes me back to the forum index with no effect. No Facebook window popup or anything.

[Edit - OK, it must simply remember that I connected my FB account when 3.02 was running, because now my FB avatar is there].

It no worky yet. Sorry. Though maybe the second issue is a non-issue. :(

mtbikemike 09-26-2011 09:21 PM

Quote:

Originally Posted by Morrus (Post 2250303)
OK, just installed the latest version.

I haven't had chance to test it fully yet, but there's some odd stuff going on with tables or something in the navbar which didn't happen in the 3.02 version. The button seems to be contained to the top half of a table cell or something. Screenshot attached.

Pressing the button simply takes me to the "Thank you for logging in, Morrus" interrupt screen, and then takes me back to the forum index with no effect. No Facebook window popup or anything.

[Edit - OK, it must simply remember that I connected my FB account when 3.02 was running, because now my FB avatar is there].

It no worky yet. Sorry. Though maybe the second issue is a non-issue. :(


RE navbar: I had to switch over to checking user's online status with javascript. Because FB doesn't destroy their cookie on logout, a race condition occurs where if the user logged out from facebook, they would still appear logged in on FB within vb and would get a FB error if they tried to post a thread. So there's a bunch of new logic in the fbconnect_button and fbconnect_init templates. You probably customized fbconnect_button, right?

RE second item: That's how it should work, you probably already linked your account to FB.

Morrus 09-26-2011 09:57 PM

Quote:

Originally Posted by mtbikemike (Post 2250349)
RE navbar: I had to switch over to checking user's online status with javascript. Because FB doesn't destroy their cookie on logout, a race condition occurs where if the user logged out from facebook, they would still appear logged in on FB within vb and would get a FB error if they tried to post a thread. So there's a bunch of new logic in the fbconnect_button and fbconnect_init templates. You probably customized fbconnect_button, right?

Haven't touched it.

The issue isn't anything to do with the functionality, it's simply the display - the button's positioning looks wonky, different to how it looked in the 3.02 version. I haven't dared to touch anything for fear of breaking it.

Taringa! CS 09-26-2011 11:37 PM

mtbikemike any hints on my case? thanks!

jlew24asu 09-27-2011 11:40 AM

I'm running 3.8.4, is this safe to install yet?

silk's mod was a disaster and really messed up countless boards. I'd realyl love to install this but would love confirmation that it's working.

thank you to the coder for giving it another try.

Morrus 09-27-2011 12:00 PM

I tried uninstalling at reinstalling, but when attempting to reinstall I get the following error:

XML Error: Processing Instruction not finished at Line 151

mtbikemike 09-27-2011 04:20 PM

Quote:

Originally Posted by jlew24asu (Post 2250517)
I'm running 3.8.4, is this safe to install yet?

silk's mod was a disaster and really messed up countless boards. I'd realyl love to install this but would love confirmation that it's working.

thank you to the coder for giving it another try.

Yeah, this is turning into a head ache. Thought I tested it pretty thoroughly, but there are some non-normal use cases and unexpected browser dependencies. Add to that two sets of sessions/cookies that make debugging difficult.

I'm going to mark this as in beta and continue working on it until it gets rock solid.

For those of you who installed, thank you for helping out. I recommend uninstalling and waiting a bit until I get this all straightened out. I'm not giving up yet!! :p

Taringa! CS 09-27-2011 05:06 PM

Great news mike!


All times are GMT. The time now is 12:53 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.01494 seconds
  • Memory Usage 1,851KB
  • 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
  • (3)bbcode_code_printable
  • (26)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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