Forum Academy Marketplace Showcase Pricing Features

Twitter sign in / log in plugin not capturing emails

Hi guys,

My app needs a variety of social logins that collect user’s email addresses, and so far I’ve gotten the Facebook, LinkedIn and Google log ins all working great… and now the last one I really want is Twitter… but I just can’t get the damn thing working. It logs the user in, but I isn’t capturing their email, rendering it useless.

The LinkedIn plugin had the same problem, and after some research in these forums saw that it was because LinkedIn made an update to their API that meant you needed to request email separately, and fortunately @Neerja (https://forum.bubble.io/u/neerja) made an awesome reply to this post: LinkedIn Oauth profile data - and walked you through building a custom API connection that took the place of the LinkedIn plugin.

I’ve tried adding an action in the workflow immediately after the Twitter signup to retrieve the email, but when I get to “current user’s Twitter’s…” email isn’t in the list.

So it looks like its not pulling the email in.

In the Twitter developer settings I’ve already added the “Request email address from users” option:

What makes it more weird is that even if I do try to add some other data to the user, like the profile photo, that photo still doesn’t get added to the user.

I’ve scoured these forums, google, and YouTube and can’t find anything similar for Twitter. I tried looking through the Twitter API documentation but I very quickly felt like a child looking through a rock science manual… so there’s no chance I’m going to be able to just work it out on my own.

So it just looks like Bubble’s Twitter plugin doesn’t pull the email in, so the only other option is to do what I did with LinkedIn and create a new API call… but that is just waaaaay beyond my skill level. Looking at API documentation is like looking at Egyptian hieroglyphics.

Could anyone help? Are there any API geniuses here that could walk me through creating a Twitter API?

Very much appreciate any responses!

Aslen

Bump. Also interested in this.

Is anyone collecting emails through Twitter? Or is the only option building an API call?

EDIT: I see that we can retrieve emails from Twitters end, so it seems this can just be an addition on Bubble’s side for the plugin. @emmanuel @eve is this something that can be added?

You can use Auth0 to do this.

But you still need to do the API part.

1 Like

Yeah I got it working in the end using Noqode’s Twitter User oAuth plugin. At first they didn’t support email capture, but they pushed an update out that did, and after some fiddling I eventually got it to work.


https://docs.zeroqode.com/plugins/twitter-oauth-1.0a-plugin

1 Like

Can we get this added to the twitter auth plugin? From everything I’ve seen in the twitter dev docs, all you need to do to obtain the email address programmatically is to add “include_email=true” with the authorization request. Obviously the user has to go into their twitter developer account and indicate that they want to request the email address, but once that’s been done it should work. There could just be a plugin setting for “request user email address” with some text explaining it won’t work if the user hasn’t enabled it in their twitter app.

If not, is there at least another way to do it without using a third-party paid plugin?

Yep, I’d do what Nigel suggested and just make another request. Social media companies are pretty protective of user’s emails now, and although you’ve enabled the “Request email address from users” option, this is probably just Twitter’s way of making sure that you really need the email.

It’s interesting under their GET account/verify_credentials page (this is probably the request to make) that they make a point of saying the following:

Please note - Your app will need to regenerate the user access tokens for previously authenticated users to access their email address.

Hey @aslen,

I’ve tried Twitter User OAuth plugin and I keep getting this error even after I refresh the access tokens in the Twitter Developer portal, and recheck that I followed all the steps in ZeroCode’s docuumentation.


Did you ever get this 403 error? Do you know how I might solve it?

I’ve seen people post this error on this and other threads, but perhaps there’s something specific to the ZeroCode PlugIn that I’m missing?

Hey Austin,
I am having the same problem with fetching the users email from twitter

Interested in your solution

Are you suggesting this can be done programmatically in bubble?

If so how would this be done?

Thanks
Lee

It’s been a while since I took a look at this, but from what I can remember the Twitter docs allow requesting email addresses when going through the Oauth flow. As of when I made that comment, bubble’s Twitter plugin didn’t take advantage of that option, which lead to the error. If this hasn’t been fixed, the solution would be to either use another plugin that allows for this or write your own OAuth requests.

1 Like

Thanks for your quick reply

Can you point me in the direction of where in bubble to write our own OAuth request?
and what that might involve?

You previously mentioned include_email=true

Lee

You would follow the steps here:

https://developer.twitter.com/en/docs/authentication/oauth-1-0a/obtaining-user-access-tokens

This might require writing a plugin or using the “Api connector plugin”, I’m not sure because I haven’t done it. At one of the steps along the way, you would include include_email=true as a url parameter.

This is definitely something you would need experience with API programming to make work. It’s not under the typical usecase for non-technical people, hence why bubble has a plugin for it.

1 Like

Use Pathfix? That should allow you to specify the scope.

1 Like

HI Nigel

I am also trying the pathfix plugin on second version of our app

The bubble twitter plugin is nice and simple set up! Shame it does not pull in the email from twitter!

L

Yes, it is. A few of the native social signup ones have not been updated with the scope changes.

1 Like

So is there a plan to add email to the bubble twitter plugin?

1 Like

Hey @leeedahs thanks for the kind words!

If you are looking to pull in Twitter profile for the user, you could use the SSO plugin for this?

I’m amazed this plugin hasn’t been updated.

Current Status is unusable due to the lack of email capture.