Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

CB Connect sets one Facebook and LinkedIn account for all users

11 years 9 months ago - 11 years 9 months ago #219640 by oorzaak@oorzaak.nl
Hi,

I've been struggling with the concept of the CB Connect plugin before, and I'm afraid I'm not done yet.

I thought I set up everything correctly now, with help from Krileon on this forum.

But after I allowed my users to submit their social media details, I found out that in all of their profiles, my own LinkedIn and Facebook accounts are shown. I also installed the Twitter plugin and this works as expected, showing the tweets from the users' accounts.


I wonder what I did wrong with LinkedIn and Facebook?


Kind regards, Frits


edit: Every user sees my accounts and so do not-registered site visitors. At first I thought I was the only one seeing my LinkedIn and Facebook accounts, maybe because I was viewing while being logged on to these sites, but this is not the case.
Last edit: 11 years 9 months ago by oorzaak@oorzaak.nl.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 9 months ago #219655 by krileon

edit: Every user sees my accounts and so do not-registered site visitors. At first I thought I was the only one seeing my LinkedIn and Facebook accounts, maybe because I was viewing while being logged on to these sites, but this is not the case.

Don't understand. Seeing it where? In the pop-up? Don't see how this is even possible. If it were then it has to be on social sites end of problems as they're entirely responsible for loading in the pop up. It's supposed to be a login form asking them to login with their social site credentials if they aren't already logged in that is. It should show your Application and information regarding your Application in the popup as well.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

11 years 8 months ago #219984 by oorzaak@oorzaak.nl
Hi Krileon,

Thanks for your reply. I think that I understand what went wrong - though I still have some questions. But first I'll try to explain what happened - as the issue was not in the pop-up like you assumed.

In the CB Tab Management I've created a separate tab for each social network (FB, Twitter, LinkedIn, Google, Windows Live).

On the LinkedIn tab I've put two fields:
  • linkedin_userid (which was already present in CB by default but on a different tab), and
  • A newly created field of the type LinkedIn Plugin > Custom
In the Custom field I copied the script IN/MemberProfile which I found on developer.linkedin.com/plugins . Two things went wrong as a result of this:
  • This field caused the LinkedIn tab to appear on every CB profile on the website, regardless wether the user had LinkedIn connected or not - and most of them had not yet made a connection because I noticed the issue only hours after I added this option;
  • The script contained a reference to my own LinkedIn profile, causing my LinkedIn profile to appear in every LinkedIn tab in every CB users' profile. In other words: the script turned out not to be dynamic.

After disabling the custom field, the LinkedIn tab behaved as expected again:
  • It does not appear when the user does not have a LinkedIn account connected to CB, and
  • It shows a link to the appropriate LinkedIn account of an individual user when they have connected their LinkedIn account to CB.

Now for Facebook, the situation was somewhat similar. On the FB tab I’ve put these two fields:
  • fb_userid (which was present in CB by default), and
  • A newly created field of the type Facebook social plugin > Activity Feed.

Just like the Custom field on the LinkedIn tab, the Activity field caused the FB tab to appear on each CB user's profile with the same content. In this case, it said that there were no recent activities to show. Disabling this field had similar results like disabling the Custom field in the LinkedIn tab.


So far for my understanding of what happened. Still I do have some questions:
  • I've also created a new field on my Twitter tab, a field of the type Twitter widget > Profile, which showes the latest tweets from the Twitter account which is connected. How come that this field behaved correctly right from the start, while the other fields caused such troubles?
  • In the LinkedIn IN/MemberProfile script I would like to replace the hard coded reference to my account with a dynamic reference to the appropriate user's account. Could you tell me how to do this?
  • The Twitter widget acts exactly as one would expect. Do you have any documentation or other resources for adding / creating such reliable widgets for the other social networks?

Thanks, Frits

Please Log in or Create an account to join the conversation.

11 years 8 months ago #220015 by oorzaak@oorzaak.nl
I'm afraid I'll have to take back some of the good news as described above.

After testing with a small group of users I've found out that the links generated by the linkedin_userid and fb_userid fields do link to the LinkedIn or FB accounts of the website visitor, not to those of the CB user whose profile you are visiting. This applies both to visitors who are registered and logged on into Joomla/CB, and to non-registered visitors. If a visitor is not logged on into FB or LinkedIn, he will be prompted with a login box for FB of LinkedIn.

So it seems that I am not able at the moment to activate any widget or similar which makes a dynamic use of the FB or LinkedIn details of CB profile. Instead, the visitor is redirected to his own FB of LinkedIn account. Could you tell me what I'll need to accomplish what I'm looking for?

The Twitter plugin that comes with CB Connect, does exactly what I am after. This applies both to the widget which shows the latest tweets and to the link generated by the twitter_userid field. So at first it seemed to me that I was doing something wrong with FB and LinkedIn. But now I tend to think these plugins are very different 'under the hood' so maybe I should not try to compare?

Kind regards, Frits

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #220044 by krileon

This field caused the LinkedIn tab to appear on every CB profile on the website, regardless wether the user had LinkedIn connected or not - and most of them had not yet made a connection because I noticed the issue only hours after I added this option;

It doesn't check that they have one. If it did then numerous widgets wouldn't work because a lot of them don't require a connection. For example I could add a custom follow button to their profile that has no relation to their connection. It supports substitutions so just use an IF statement to stop it from rendering. Example as follows.

[cb:if linkedin_userid!=""]My widget.[/cb:if]

The script contained a reference to my own LinkedIn profile, causing my LinkedIn profile to appear in every LinkedIn tab in every CB users' profile. In other words: the script turned out not to be dynamic.

That has nothing to do with CB Connect. You implemented the widget wrong. Social site widgets always use the viewing users information if none is specific. Often they've a parameter to specify a user id or a username of some sort so it's specific to a user. The only widget that worked well dynamically was the Share one, which is why it's the only one available from dropdown. Widgets like "Follow" require a company name instead of linkedin id or username.

It does not appear when the user does not have a LinkedIn account connected to CB, and

Use CB Conditional to disable tabs/fields based off the linkedin id as needed.

It shows a link to the appropriate LinkedIn account of an individual user when they have connected their LinkedIn account to CB.

LinkedIn ID field should always do this. It's just a HTML href element with a normal HTTP URL. Widgets and such have zero affect on its functionality.

Just like the Custom field on the LinkedIn tab, the Activity field caused the FB tab to appear on each CB user's profile with the same content. In this case, it said that there were no recent activities to show. Disabling this field had similar results like disabling the Custom field in the LinkedIn tab.

Same as above, it doesn't care if they have an ID or not. You need to use CB Conditional to show/hide fields/tabs based off the ID field. This is done to allow full usage in any way someone may need. If I force it to only show when an id is present then it limits its usage capabilities. If no id is present a widget/plugin will use the person viewing it (if they have a social site session active). All of this is rendered and handled by the social site, CB Connect just prepares the HTML for you (except with Custom widgets/plugins).

I've also created a new field on my Twitter tab, a field of the type Twitter widget > Profile, which showes the latest tweets from the Twitter account which is connected. How come that this field behaved correctly right from the start, while the other fields caused such troubles?

It requires a twitter id. Without it it flat out errors. Many widgets/plugins have multiple usecases and don't always require an ID. For ones that do it's enforced.

In the LinkedIn IN/MemberProfile script I would like to replace the hard coded reference to my account with a dynamic reference to the appropriate user's account. Could you tell me how to do this?

You would need to use synchronize their linkedin username (if possible) to a field then build a URL from that. LinkedIn widgets are designed, frankly, terribly. Most are dependent on pointless profile values instead of just using profile id like all other social sites (except twitter, they use username).

The Twitter widget acts exactly as one would expect. Do you have any documentation or other resources for adding / creating such reliable widgets for the other social networks?

Best solution is to use CB Conditional to disable a field if the user doesn't have an appropriate social site ID. This will be the most reliable solution as it completely removes the fields rendering.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: oorzaak@oorzaak.nl

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum