C# get Twitter screen_name or user_id from Email

554 views Asked by At

Hello I am making a website where users login ( with our own ID, they cant login with google, facebook or twitter) and I want to fetch their Twitter profile picture from their email adress, which was provided to us when they registered (basically check if an screen_name/userID with the provided email adress exists on Twitter).

I know how to get the user information with a static screen_name (for example my own). The problem is that i cant get their info from their email adress even though its used for loging in on Twitter (or better said i dont know how).

Simplified:

User logs in > we check their email > fetch twitter userID from email > get their profile picture

The bolded out part is the one i dont know how to do.

Same question for facebook :D

1

There are 1 answers

2
David Hoelzer On

Referencing the Twitter API documentation, you will not be able to look a user up by email address. You would be far better off requesting their Twitter handle.

If you think about it this makes perfect sense. It protects a somewhat private piece of information.