How to create a subscribe/follow button for user posts using Memberstack and Webflow CMS?
Does anyone know how to create a subscribe/follow button using memberstack? So that the user's latest posts go into a cms collection that can be filtered? Something like the memberstack and webflow social media build, but with the ability to follow/unfollow certain people and see their latest posts?
Comments
4 comments
Jack Ellis you can use the json feature to hold the array of userId of user I followed so as to see their post, if unfollowed then you remove the userId from the array.
Do you know how to remove the userID from the array? I figured out how to add it but not remove it
Thanks!
const existingUserIdList = [1,2,3,4,5]
const userIdToRemove = 3
Thank you so much! Appreciate the help
I'm still stuck on this... I'll give you more context. I'm using this script (https://www.memberstack.com/scripts/add-items-to-member-json) to add items to a json list. So in a member's json it shows {
"subscriptions": [
"668ab58....",
"666399f...",
"668bfb56....",
]
} Adding the json items works fine. Though, I'm trying to display a button for subscribe and unsubscribe. So if CMS ID matches with one of the subscription CMS IDs it'll show the unsubscribe button and the user will be able to remove the item from their json list by clicking it. I don't even know where to start when checking to see if a value matches the member's json list and then removing it
Please sign in to leave a comment.