Facebook OAuth Error After Signup

Hello!

I’m trying to set up “Sign in with Facebook” such that my app gains the “ads_management” permission. I’m using API Connector to set this up via Facebook OAuth, and have used a few topics in this forum as reference – thank you to all who have provided guidance here!

Unfortunately, though, I’ve hit a bit of a roadblock. When a user clicks on my “sign in” button, they successfully redirect to Facebook, see a modal with a “You’ve previously linked [APP] to Facebook” header, and when they click the “Continue” button they get redirected to the bubble app, but an alert with the below text pops up:

“The service apiconnector2-bTGNz did not return an ID for this user. The user cannot be logged in. Please check your settings or reach out to the plugin author.”

Here is what I think is happening:

I think it’s possible (likely?) that I created this mess for myself. I believe that in working on this late last night, I successfully signed in, but then deleted the User that was created, which may have left my bubble app in a spot where it no longer has access to my FB App’s test user ID, but FB no longer sends the app my user ID during sign in because the app should already have it.

With this theory in mind, I’ve tried getting the user ID from Facebook developer tools and creating a new user in Bubble with the given ID, but there doesn’t appear to be a way to create a user with a specific ID.

I’ve also tried to find a way that to get FB to re-send a user ID during the sign up flow, but I haven’t had luck there.

I’m rather new to integrating via OAuth, and I’m running low on other ideas to try, so any guidance would be appreciated!

Here are my OAuth settings in Bubble’s API Connector plugin:

change client_token to id

also you could add more interesting scope

2 Likes

Thank you! That was the best kind of fix – quick and simple. I really appreciate your help.

1 Like

Unfortunately it seems that I may have spoken a tad too soon. Users are now able to sign in using Facebook, and the first time they do, the bubble app creates a user. But it doesn’t seem that I’m getting to the point of getting an access token from the FB server. I believe this is the case for two reasons:

(1) After signing in the first time, I’m still seeing the “Warning” in the API Connector UI, saying that I must sign in using ?debug_mode=true (I’ve done this in both development and live modes.)

(2) In trying to initialize additional requests from API connector I’m getting an error (below)

Here is my current setup within API Connector – anyone see something I might be missing?

Here is the error I’m receiving when trying to initialize API calls:

Here are the FB docs that describe the step I believe I’m missing: Manually Build a Login Flow - Facebook Login - Documentation - Meta for Developers

Any help would be much appreciated!

well, no not really, this is nothing to do with User id key path.

I built plugin so didn’t have to do ?debug_mode authentication, and my plugin is working fine. Just follow the steps the api connector tells you correctly. Maybe you need application approval and your users are not marked as test users.

1 Like

True! They’re different problems.

Ah, I see. Yes I’ve tried going through the API Connector directions quite closely but I’ll keep trying.