Issue with Follow system - showcasing number of followers/following

Hi!

So I have created a follow/following system and in the profile page of the user, the person can see their number of followers and following.

As you can see, it shows (-1).

I have followed the workflow of this twitter clone on the bubble:

Here’s my system for following:

for followers:

Please let me know where I am going wrong!

Is there any reason you’re subtracting 1 from the count in the expressions? If the count of followers/following is 0, then this would result in the -1 you are seeing.

Hey,

so in the demo of ‘notreal twitter’ that is how it was done.
So I did remove the -1 and then a user is followed by somone, it always showed 1 extra

I had a brief look at the demo app, and I believe I’ve found a solution for your issue.

On sign up of a new user, ensure to add the Current User to their own Following list as per the screenshot below. This will ensure that the initial following/followers count is 0 and not -1. You will need to ensure the following/followers expressions include the subtraction of 1, as it did in your original screenshots.

Please let me know if this solves your issue :slightly_smiling_face:

2 Likes

Hey,

So this solves the issue when I view another user’s profile. Now it doesn’t show (-1)

But when I am checking the current users profile, it still shows (0):

I have made these two profiles follow each other for testing

I literally just went through this issue this morning in order to debug a similar issue on my app. My problem (that took me absolute ages to figure out) is that I had set up my privacy rules where other users did not have access to the count. If you have privacy rules, make sure the count fields are available to other users.

1 Like

Which is this counts field? Can you share a screenshot?

I don’t use separate count fields. I just count the number of users in the list of followers. This is how it is set up…

  1. The User Data Type has 2 user list fields (followMe and IfollowThem) as follows:

  2. This shows up like such in the app data:


    Ned is following 2 and is being followed by 4.

  3. Then I just do this in the text field:
    Screen Shot 2020-04-09 at 7.52.59 AM

  4. To produce this result:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.