Is there a way to 'follow' someones twitter from in the app

Hey everyone! On my user profiles, users include their Twitter handles. Is there a way to follow them from within the glideapp? Also, is there a way to pull twitter profile pictures into the app using the handle?

Thanks!

Hm…closest I could get is this:

https://twitter.com/rpetitto/photo

…which isn’t the actual photo link…the actual photo link is something like this:
https://pbs.twimg.com/profile_images/1170028679650512896/wkDY5_Mm_400x400.jpg

Not easy, but this might do the trick if you’re willing to play around with Twitter API:

1 Like

You can get the profile image by this:

http://twivatar.glitch.me/[user_name]

For example: http://twivatar.glitch.me/rpetitto

Therefore, in Angelia’s question, the right formula for an image column would be:

=ARRAYFORMULA(IF(A2:A<>"","http://twivatar.glitch.me/"&A2:A,""))

That’s if Angelia has the Twitter handles, can you verify to me if you store handles directly (as in “rpetitto”) or just the link to the profile?

3 Likes

Wow! NICE FIND @thinhdinh! I was looking for something similar and couldn’t find what you found! You’re a wizard.

1 Like

Are you familiar with glitch.me? Did you create this solution? Wonder what else we could do with this platform in conjunction with Glide!

They are stored as just rpetito not the link. This is awesome I will try!

1 Like

No, I luckily found it when searching StackOverflow a while ago. Have you thought of any further applications of this? I would love to listen.

Just found the “follow” solution as well, but not exactly “in the app”. You can try adding it as a open in web view or open link to see if it works.

https://twitter.com/intent/follow?screen_name=[user_name]

For example:

https://twitter.com/intent/follow?screen_name=rpetitto

That’s awesome so I can just put that as a link in the app and it would make that work! You guys are awesome. Thank you !

I got them to show up in the cells and when I click the link (in the sheet) they launch the image correctly, but when I launch my app you can’t see them. Nothing shows. Am I doing something wrong?

I got the images to work. Check it out. I need to fill in the ones I don’t have. But it works!!! About to try the link now and then will show you.

Yep it you have any problems in the application of this just let me know. I don’t know the full structure of your data so any screenshots would help if you need assistance.

Ok thanks! I’m trying to use that same array type statement you gave me now to get the link to follow to work.

1 Like

Yeah it should work in the same manner.

=ARRAYFORMULA(IF(A2:A<>"","https://twitter.com/intent/follow?screen_name="&A2:A,""))

Hi, when using the arrayformula function it fills in the entire row which is cool and means I won’t have to keep copying it when a row is added, but if that person does not have a twitter account, I want to be able to add that image manually or allow someone to modify their image. When I updated an image, it wiped out the entire column and everyone’s images disappeared in the app. It took me a minute to figure out what I did, but now that I know, do you have any workarounds? If I do a formula to concatenate the user name to the URL it works, but I still like the ability not need to keep updating the formula for new entries.

Thanks so much!

This is pretty cool and a good way to pull in a profile picture for someone who doesn’t necessarily want to upload an image to Glide. Is there any way this would work with other social media outlets (I’m thinking Facebook or Instagram as options too).

Not sure if this would help, but for my apps, I create a Template column with a generic user image. Then create an IFTHEN column that says if the profile image is empty, then use the Template column, else use the profile column. Similar logic should work for this too.

1 Like

I am not that familiar with Glitch, but you may want to check on there. It looks like the code was written in there and then just added to the formula in the sheet, so whatever that line would look like that points directly to that profile image would be the ticket to insert (only problem is fb has this long random string). Hopefully someone knows how to translate that randomness to a profile.

Thanks for the template column for the generic, that makes sense. I had a separate image column for the manual images, just wasn’t sure how to bring them together. It looks like IFTHEN would do the trick. Thanks so much! Sorry I wasn’t as helpful on the FB/IG string.

1 Like

I’m thinking about email profiles instead: Hotmail, Gmail, etc

In that way, you can capture the photo/avatar profile associated to the current logged user in Glide!!

1 Like

Thanks for the Template suggestion, I forgot about that :rofl:

I will try to find all existing methods to link to social account images. Facebook, Instagram and what else?

3 Likes