đŸ‘« Friend Requests in Glide

:wave: Hey fellow Gliders!

In this intermediate-level video, you’ll learn how to allow users to request to be a friend to another user.

:point_right: Allow users to request friendship
:point_right: Allow that user to accept/decline the request
:point_right: Accepting a friend requests mutually adds friendship
:point_right: Allow either friend to remove the friendship (mutually ends the friendship)

This one uses quite a bit of array logic and a few custom actions on buttons, but the UX is pretty slick!

:popcorn: Enjoy!

:gem: Grab a copy of this app by becoming a Glide VIP member!

14 Likes

Amazing tutorial! But why no replies?

Edit: I made it 1 reply

1 Like

Not sure! Happy to see you found it useful!

1 Like

no problem!

What do you set the visibility for the accept/decline button bar?

Whether or not the person (email) is the signed user. Don’t want them being able to accept themselves as a friend

1 Like

Hi @Robert_Petitto thank you very much for this thorough tutorial!
The only thing I don’t understand is how to get access to (or purchase) your template?
Thank you for your answer.

Hi Ivanne,

Those who join as a VIP member to my YouTube channel get access to all my past and future templates.

This link should take you to my join page:

https://www.youtube.com/channel/UCO9Yiy4Hi8vBzsJmsjgu-mQ/join

1 Like

Thank you Robert,
This is awesome! I had no idea that this kind of subscriptions existed through Youtube.
As I am following you from France, the Youtube page displays 2 buttons: subscribe (to follow the channel) and “Rejoindre” (basically: join) which is the way to become a VIP member.
In short: not very intuitive given that there are already 3 links one can click.
This makes my day, again thanks.

Yeah
One day I’ll have a proper community with proper and more obvious ways to “join”. DM me if you still can’t find what you’re looking for!

1 Like

@Robert_Petitto I’m confused about how users find other users to add them as friends. presumably they should search “john” and it would look at info in the public profile table. I would want them to be able to search by email but i don’t want that exposed in the public profile section. How should they do that?

You can’t have your cake and eat it too :wink:
If the email address isn’t in the Public Profile then it’s not possible. You can’t find something that doesn’t exist.

2 Likes

Is it safe to use the email in public profile? Should I make it a row owner?

If you make email a row owner column, then the only row accessible to a user with a search will be their own. They won’t have any kind of access to rows of other users that they do not own.

If you have an email that is just hidden from view on the screen, but the rows with that email are accessible to all users (not under row ownership), someone could still snoop the network traffic and underlying code to figure out someone’s email address.

3 Likes

Have you been able to ‘double friend’ at once time? friends is working correctly adn i set up an invite system which is connecting users to codes. However
since I cant record the invitee email in a public table, i can not figure out how to double friend for this case.

-existing user invites new user and provides code.
-new user creates account and ‘accepts’ friend request (it can be done the normal way bc the user is new and wasnt actually invited)

  • from the friend logic i can 1- add the friend in one direction (the user adding to the invitee since the use is logged in) but can’t see how to do it bi-directional.

Thoughts?

Anoterh question is how to send an email to alert a user that a friend has requested them. emails are not in the public profile tables
is there a way to do this?

Ony way to do this would be to use the API → request has user ID → query users → fetch email → email user.

1 Like

I have 2 questions:

1/Why do you need to do it bi-directional? I assume you have an Invites table that stores the user IDs of both people?

2/You’re having row owners for the Users table, and a mirrored public table that doesn’t contain the email?