Skip to Content Skip to Menu

Profile URL redirecting for facebook

  • lylejover
  • lylejover
  • OFFLINE
  • Posts: 30
  • Thanks: 3
  • Karma: 1
10 years 6 months ago #244293 by lylejover
Profile URL redirecting for facebook was created by lylejover
Im using FB's debugger tool. For some reason even CB profiles access are set to public, it does a 303 redirect when facebook share runs its script to get the link details.

From the tool, it gets the details from #2 instead of #1.

1. index.php?option=com_comprofiler&task=userprofile&user=1003&Itemid=744
2. index.php?option=com_users&view=login

How do I keep it to stay on the first link?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #244298 by krileon
Replied by krileon on topic Profile URL redirecting for facebook
How are you adding a share button? If you're using CB Connect and the Facebook Social Plugin field to render a share button then ensure the scope is set to User so it manually adds the share URL as the profile URL. If you're not using CB Connect then you need to add metadata for Facebook to pickup or adjust the share button so it has a static URL otherwise Facebook just grabs the first URL it finds usually.


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.

  • lylejover
  • lylejover
  • OFFLINE
  • Posts: 30
  • Thanks: 3
  • Karma: 1
10 years 6 months ago #244344 by lylejover
Replied by lylejover on topic Profile URL redirecting for facebook
Hi Krileon,

I am using CB Connect. I tried Twitter (Tweet) Facebook (Send, There is no share?) both are in user scope.

Twitter works fine but facebook is not. From the debugger, it fetches the correct URL but uses the canonical URL instead (index.php?option=com_users&view=login)

Not sure why.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #244391 by krileon
Replied by krileon on topic Profile URL redirecting for facebook
The Facebook Debugger is looking for specific metadata that the Facebook Social Plugin fields do not prepare by default. You need to set them up to do that (see the metadata parameters below the social plugin selection). However, the correct URL is forced to the social plugin using the "data-href" attribute so when you're using the Send button it should send the correct URL regardless of the Facebook Debugger complaining.

There is no share?

Correct, that was added after the current release was released. Share button will be added in next release. In the mean time you can use the following to have a share button.

Social Plugin: Custom
Source:
Code:
<div class="fb-share-button" data-href="[profile_url]" data-type="button_count"></div>


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.

  • lylejover
  • lylejover
  • OFFLINE
  • Posts: 30
  • Thanks: 3
  • Karma: 1
10 years 6 months ago #244434 by lylejover
Replied by lylejover on topic Profile URL redirecting for facebook
Hi Krileon,

I got most working now. I can now point the social plugin to the correct url and at the same time point the right descriptive text, titles and etc.

But i noticed one thing though,if this is the link(this happens when the user is not logged in), everything is working well. I get the correct information for the user.

index.php?option=com_comprofiler&task=userprofile&user=1003

But when the user is logged in, it appends the item id for each profile URL.
index.php?option=com_comprofiler&task=userprofile&user=1003&Itemid=744

If this is the case, I only get the correct URL right because its already suppressed as you have suggested but the rest of the details becomes messed up because this is the one that I mentioned above that redirects internally to log in.

As an alternative, I just added a default meta tag in case things gets messed up so that I would still be displaying "acceptable" generic information from FB Share.

Any thoughts on this? Is it possible to supress the Item ID? Or any suggestions that you may have?

Thanks for the great support.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #244496 by krileon
Replied by krileon on topic Profile URL redirecting for facebook
An Itemid should always be present. If not then you're missing a public and published Joomla menu link to CBs profile page. Alternatively you can force whatever URL structure you want. Example as follows.

Code:
<div class="fb-share-button" data-href="index.php?option=com_comprofiler&task=userprofile&user=[user_id]" data-type="button_count"></div>

The custom social plugin feature supports full substitutions. So in the case of the above it'll add the users user id.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum