Automatically add Facebook friends

Hi Bubble community!

Since I want to display mutual friends (in the app) but also mutual facebook friends, I thought I simplify it by doing this through their unique user IDs in each other’s “friends” lists.
That way I wouldn’t have double friends.

A & B = FB friends
A & C = FB friends
→ B & C have = mutual friend

But now add: B & C & D = app friends
→ B & C have actually 2 mutual friends! (A [through FB] and D [through the app])

Always filtering through two lists (FB friend list & app friendlist) seemed a bit tedious, so I wanted to create one list with the users unique IDs only (since I will add email subscription later on). Therefore, I wanted to ‘transcribe’ the facebook ID to the unique ID. Which is pretty simple, as shown here in my test:

Take user A’s facebook friends and put all their unique IDs into A’s ‘friends’ list. Works! But only, when I trigger it through a button!!

I want it to run automatically on page load. But it just gets stuck. (Only shows a white page and doesn’t go to the next step in the workflow, which would be showing an image.)

Any help, please?
Thank you!

Hey Scott! @sridharan.s
I’ve seen you seem to have a good understanding of bubble on other threads. could you please help me with this? :slight_smile:

It’s odd that it’s work with a button, but not on page load. I can’t think of anything specific that’d cause that. If, for some reason, you’re referencing another custom state on the page that hasn’t loaded yet, that could be causing it.

Did you try adding ?debug_mode=true to the url and then go through the actions step by step to see what’s happening? …that’s probably your best bet to figure out what’s not working as anticipated.

Yes, and it says it does, but still in the data nothing happens.
Also it shows that it does go to the next step of setting the state of the current tab. But it still doesn’t show the TinderPile that should be visible now.

Is it a bug or a mistake in my workflow? Because it does seem like a bug by now :thinking:

If you’ve looked at it in debug_mode and are seeing that it should be working, then there’s one last thing you can check – look at the logs and see what they say. If the logs are different than what you’re seeing in the database, then definitely submit a bug.

If not, then perhaps the logs can help you figure out what’s going on.