I’m currently building a social platform where users can publish content.
When content is published, it shows a preview window of a post.
When a user clicks on this thumbnail, the data from the post is displayed on a pop with the full post content.
I’ve also added social share buttons to each post, allowing users to share this content to other platforms.
When a users shares a post to another platform, it’s currently classifying the post url as just the home page.
Is there a way to create a unique url for each post.
Ideally I’d like structure of the post url to be the home page URL + the post title & published data.
^These fields are created when a post is published.
Would appreciate any help
2 Likes
Bump on this one if anyone has any experience.
To create a URL you can set a text type state being “This URL”?parameter=value or just write it https://yourapp.com/yourpage?parameter=value
Like:
https://yourapp.com/yourpage?shared=yes&title=title-of-the-post-you-created
Then give that text to your user so he feeds whoever he wants with it.
Then to grab it when a user lands on the page through the shared link:
Event: Page is loaded, with a condition to this event being “Get data from page URL” parameter => shared = yes | So this workflow will only trigger if it’s a shared link.
Then you can use action “Display data in a popup: Do a search for Posts, criteria is post title = Get data from page URL parameter => title”.
Click here for Bubble’s reference on this.
Also there’s this discussion (among many others) around URL parameters.
Let me know if this helps.
Thanks for explaining.
I’ve added a title, shared, creation date, and creator to the url parameters for each post once the thumbnail is clicked and the pop-up is opened.
I’ve also added the shared=yes parameter as a condition when a page is loaded.
The bug I’ve ran into is that I must select a single post form the total repeating group.
By default, this is the first post that meets the parameters criteria.
If the only criteria is post title, it’s displaying the wrong pop-up when there’s duplicate titles.
If I add the additional parameters (creator & creation date), this logic should be fine as the parameters would be unique.
I’m just finding that I’m unable to add these additional parameters to the ‘do a search for’ parameter logic.
Would you know of any reason why it won’t accept these additional parameters?
Would appreciate any insights.
eren
July 8, 2019, 6:18am
5
Hi @lachlankirkwood1
You send text as a parameter, then you want a date and a user. So it doesn’t match.
Just send the uniqueid of that post as a parameter and simplify the data with that uniqueid
Good luck
1 Like
Worked perfectly, thanks mate.
Any insights on how to then redirect the URL back to the homepage once a popup is closed?
I’ve developed a workflow for when the pop-up is closed, but it looks to still hold the unique id parameter.
eren
July 8, 2019, 8:59am
7
When pop up is closed > Go to previous page
action will help you
Unfortunately that won’t work.
When a user clicks on a post (popup) link from an external website, the previous page logic will redirect them back to that source.
eren
July 8, 2019, 1:20pm
9
Sorry. I thought like in-app. Keep in mind this works. Must the URL be clean? I’ve never had an experiment like this. I’il get my computer back in 3-4 hours. I’il take a look for you.
eren
July 8, 2019, 5:19pm
10
Hi @lachlankirkwood1
lachlankirkwood1:
This is almost true. Just tick Send More Parameter To The Page. If you don’t add parameters, it only clears the URL.
Best
1 Like
Worked a treat.
Thanks mate, appreciate it!
1 Like
system
Closed
September 6, 2019, 4:16pm
12
This topic was automatically closed after 70 days. New replies are no longer allowed.