Social media Sharing Activity posts

1 year 2 months ago #332922 by liaskas
Replied by liaskas on topic Social media Sharing Activity posts
Yes you are right Krileon and thank you for your reply.

Both urls work pretty fine when inserted as posts in linkedin timeline. When the posts are clicked they redirect to the right single post.
For example if you share demo.cbdemosites.com/community/recent-activity?id=339 to linkedin timeline, it will redirect the clickers correctly to the timeliine and will show only post id 339.

BUT...
If the sharing is performed through a link on a website, then linked in strips the id number. So it redirects back to activity page.

example...
Let's suppose we want to create a "share to linkedin" link on our website that will share (demo.cbdemosites.com/community/recent-activity?id=339) to linkedin

The url of our link will be...
linkedin.com/shareArticle?url=demo.cbdemosites.com/community/recent-activity?id=339

If you check the above link, you will see that it redirects to share the activity post correctly but as a backlink it strips the id. So it redirects to
demo.cbdemosites.com/community/recent-activity?id

I guess that if the sef url of the activity post was demo.cbdemosites.com/community/recent-activity/339 it would work.

But this would require a menu item for a single timeline post, so the link to the certain post would be like demo.cbdemosites.com/community/recent-activity/339

I believe (in accordance to what i have read all day today) this is the problem. The way to make this work is... to have the url without "?id=339" but with "/339" at the end.

Is there any workarround for this?

Thank you in advance.

Please Log in to join the conversation.

1 year 2 months ago #332925 by krileon
Replied by krileon on topic Social media Sharing Activity posts
Are you using their share plugin below?

learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/plugins/share-plugin

Or using a share URL? If using URL be sure you're applying encodeURIComponent to the url parameter. For example the share functionality on Joomlapolis at the bottom of the page is using the share URL API and not the plugin.

As for rewriting the URLs you'd need a Joomla SEF extension for that or you can try using CB Redirect Bot to implement custom URLs. CB Activity 6.0.0 will have SEF routing for external URLs 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 to join the conversation.

1 year 2 months ago #332927 by liaskas
Replied by liaskas on topic Social media Sharing Activity posts
Thank you again Krileon for your reply.

I am using a share URL hardcoded in the cb_activity template, so that i can get the id of the post.

Looks like the only option that we have in the moment, is to use the cb_redirect plugin. So i downloaded and installed. Trying to find documentation i see there is none available yet.

Can you please explain how the plugin works?

What we need is...

when the url contains /directory?id=[numbers] to become /directory/[numbers]

How can this be done with redirect bot?

Thank you

Please Log in to join the conversation.

1 year 2 months ago #332928 by krileon
Replied by krileon on topic Social media Sharing Activity posts
CB Redirect Bot simply redirects from 1 URL to another. Your fake URL can be whatever you want, but it should contain data to rewrite to the appropriate location. Working example as follows.

From URL:
%/activity-posts/(\d+)%i
To URL:
/index.php?option=com_comprofiler&view=pluginclass&plugin=cbactivity&action=activity&func=show&id=$1
Is REGEXP: (checked)

This can be adjusted to use your SEF URL as well. Example as follows.

To URL:
/cb-activity/?id=$1

So with the above for example it will redirect from /activity-posts/1234 to /cb-activity/?id=1234. You can actually use this to have SEF routes for anything you want as long as the URL being redirected contains data to sent them where they need to go. It's basically an in PHP mod_rewrite usage.


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 to join the conversation.

1 year 2 months ago #332929 by liaskas
Replied by liaskas on topic Social media Sharing Activity posts
Thank you Krileon.
What is the best header selection for this situation on cb_redirect?

Please Log in to join the conversation.

1 year 2 months ago #332930 by liaskas
Replied by liaskas on topic Social media Sharing Activity posts
Also... there is probably something wrong with the From URL...With %/activity-posts/(\d+)%i if i provide as a url domain.com/activity-posts/3453 in the browser,
i get all the activity-posts page with all the posts, while we need the post with id 3453.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.258 seconds

Facebook Twitter LinkedIn