Topic-icon Any idea how to integrate JFBConnect with p8pbb component?

Active Subscriptions:

None
hi,

I'm using Joomla 2.5.4 and phpbb 3.0.10 bridged with p8pbb (by blogomunity) component and I wanted to have also a facebook integration. So far I had no issues but when I installed JFBConnect p8pbb is not working for Facebook registrations... all Facebook users are able to login to my web site but there's no new user for them in my phpbb3 board and they're not logged-in there. All user and authentication plug-ins are correctly ordered - JFBConnect plugins are coming before p8pbb, but still p8pbb do not receive notifications for new users (if p8pbb plugin is working I do get some phpbb3 cookies which are missing now for facebook users). I know that my issue if beyond the scope of a normal support but I would appreciate any suggestions.

regards
The topic has been locked.
Support Specialist
Mwfb,
You don't know our support very well :) We help with just about anything, as much as we can at least. Unfortunately, I don't know p8pbb, so I don't have any specific answers, but I can give some general guidelines.. and hopefully you can explain how the integration works a little better as well.

1) JFBConnect creates standard Joomla users. Other extensions should see these users just fine. However, if the bridge is creating a user in PHPBB with the same username/password as in Joomla when you register, that won't work. When JFBConnect logs a user in, we don't use a normal username/password since we're using a 'token' from Facebook to authenticate the user, which isn't stored in the database like a normal password.
2) If the bridge is setting a cookie which then PHPBB then detects, that should work. We've worked with some users using jFusion, and it has the option to use the cookie method, which does work. In that case, you'll want to make sure the JFBConnect authentication and user plugins are ordered before the p8pbb ones.

If none of that helps make some headway, let us know. We'll do what we can to help get you setup.. but it may take some time since we're not familiar with the systems :)

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
hi Alex,

upon registration you're creating a Joomla user with some username and password (it's not neccessary to be the same username and pass as Facebook account). The problem is that phpbb3 needs the same username and password in it's internal databases - most bridges could easily set a cookie for phpbb3 (including p8pbb) but this cookie contains just a user ID - if user details are not in the database this ID means nothing... If I manually create the missing entry in phpbb3 user's table I have no more issues and facebook login is working just fine both for Joomla and phpbb3. I'll contact Blogomunity for some advice (unfortunately their code is encoded and I can not fix it by myself :( ). Perhaps they rely on onUserAfterSave event to create phpbb3 users but who knows...

Could you point me to exact place where you are craeting joomla users? I could try to manually invoke onUserAfterSave for all 'user' plugins an see what happens...

Anyway thanks for your time. If I find a solution I could post it here for future reference.

regards
The topic has been locked.
Support Specialist
Mwfb,
Ahh, thanks for the description of what needs to be done (and isn't). I'm glad to hear that if you copy the data over manually, it seems to work. That's a good sign that JFBConnect is creating the user properly in a way that should work, and we agree (not just trying to push the issue on someone else) that the issue is likely more in the bridge itself.

For the onUserAfterSave trigger, we actually do not currently call that trigger after we create the user. I actually thought that it's called by Joomla itself, but maybe not. There's 2 different places it could need to go. Can you let me know what you're Registration Mode setting for JFBConnect is: Standard or Automatic? Once we have that, we can help. Once we know that (or if you want to look sooner), the you would do so in the following file: /components/com_jfbconnect/controllers/loginregister.php in either the createFacebookOnlyUser function (automatic) or createNewUser function (standard). Let us know, and we can give exact details on where to trigger the onUserAfterSave call.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Hi Alex,

I'm using JFBConnect in automatic mode and I already found where the accounts are created... unfortunately for me you indeed do invoke $user->save() (or Store()... I don't remember exactly) and that indeed tiggers all user-related events :( ... so that breaks my theory. Anyway I should say that the bridge is working just perfect out of the box - they provide an option to create phpbb3 users in almost any situations but here's what happens:
- a person from Facebook creates new account on my web site using JFBConnect
- upon that registration no phpbb3 user is created by the bridge but that's basically ok most of the time
- when the same user actually logs-in into my web site (using FB credentials of course) the bridge is able to create new phpbb3 account (that's optional synchronization in p8pbb... and almost all bridges support the same functionality). So the phpbb3 user is created on log-in and not on registration
- If a returning Facebook user comes back to my web site with modified e-mail, user name or password (.. whatever) you identify him/her by some tokens and it's correctly mapped to Joomla but (for example) his e-mail needs to be modified both in Joomla and phpbb3 databases... and here comes the problem - if p8pbb plug-ins are not triggered on user-related actions I just cannot be sure what's going on and sooner or later I'll end up with a lot of out-of-sync user details in phpbb3... It could be even worst - I'm not sure if p8pbb would not create new phpbb3 account for each returning FB user with modified details (for example if I have an account john. smith and later the same user comes back with new name, say marry.popins, I'm not sure if your component wouldn't update john. smith to marry.popins... if it does so then according to p8pbb rules (or any other bridge) that's actually a new registration and they would create new account in phpbb3's database. What should happen in the same situation is: you update john.smith to marry.popins, some bridge's event is triggered, the bridge updates also phpbb3 database and everyone is happy (including me)... It's easier for me to debug user's registration and that's why I'm trying to make it work without all optional synchronizations (by default p8pbb is creating new phpbb3 account on Joomla registration and they have an optional synchronization later on login to create phpbb3 user if username is not found in phpbb3)

Some of this explanation is just a theory - I'm not sure if you update Joomla account's details for returning users with modified data and if you do so what exactly could be altered... if you never change user names all bridges should be happy but that's not very user friendly. I'm still waiting for any response from Blogomunity and I keep digging into source codes to check other theories... It was very useful for me to understand that you're actually using user tokens to create a map between FB users and Joomla.

Please do not waste your time on this subject - I have your source codes and I can answer most of my questions by looking at them. I created this topic in case you already had the same issues before and you have some solutions ready to go. I consider my problem much beyond the scope of a normal support - your component alone is working just perfect and actually all of my problems are coming from the bridge itself... I just want to make my web site registrations rock-solid for additional custom scenarios. It's a bit difficult for me to explain what I want in English and my explanations are a bit messy - sorry for that

Regards


EDIT: If someone is interested in this topic I should say that p8pbb developers actually found an issue in their component and it's fixed now. Both plugins are working toghether without any custom modifications and for all possible scenarios (just make sure that p8pbb is the last one in plugins order).
The topic has been locked.