Convert Twitter ID to Username?

FerdieQO

Well-known member
Joined
Jul 15, 2016
Messages
213
Points
28
Is there a way to convert Twitter ID to Username or vice versa? I would like to use PHP or Javascript for this. I prefer using Javascript because it is lighter and load faster. Can any one shoot me a guide?

Thanks in advance.
 

Gecko

Well-known member
Registered
Joined
Aug 25, 2016
Messages
364
Points
0
I know that there are several websites that let you do this on them for free.

There is some code on StackOverflow but I am not sure how much help it can give you but might be worth a look.
 

FerdieQO

Well-known member
Joined
Jul 15, 2016
Messages
213
Points
28
@Gecko I checked the link and some similar posts on Google, they do don't help me to build what I expected.

All I need is a input box on the left column which allows user to type an Twitter username/Twitter Id and get the result on the right column with corresponding Twitter Id / username.

I am trying to do it by myself.
 

Gecko

Well-known member
Registered
Joined
Aug 25, 2016
Messages
364
Points
0
Gecko
I see. Well I really wouldn't know how to do that myself but hopefully someone will ring-in and help you out with the code you need.

Sorry I couldn't be of more help.
 

kevinhng86

Member
Registered
Joined
Jan 12, 2017
Messages
58
Points
0
Hi FerdieQO,

If you don't mind me asking. Can you please give me a little bit more detail of your circumstance. There is no guarantee that I can but I will try to help you.
 

FerdieQO

Well-known member
Joined
Jul 15, 2016
Messages
213
Points
28
FerdieQO
Hi

I want to try to convert from Twitter username to Twitter ID

For example
Twitter URL of this forum

Code:
https://twitter.com/webdothosting
When I type into an input box

Code:
@webdothosting or webdothosting
it should display this Twitter ID: 865666956

or vice versa

when I type 865666956 into an input box

It should give me this result

Code:
@webdothosting
Thanks
 

kevinhng86

Member
Registered
Joined
Jan 12, 2017
Messages
58
Points
0
kevinhng86
This is doable, I check out this already. You can't write this in Javascript due to the limitation of Ajax and XMLHttpRequest(). They can't patch to remote server without special permission. Therefore accessing remote API can only be done in Perl,Python, Php and more but just not JavaScript.

I will write this later and give a post on this. It is a bit complicated to explain but I will start a new threat on this. I probably won't explain but will only give a working script and how to use it.
 

FerdieQO

Well-known member
Joined
Jul 15, 2016
Messages
213
Points
28
FerdieQO
Cool, I am looking forward to reading your thread and discussing with you on this.
I'm also trying to do this with PHP and Javascript and hope it will be done soon.
 

kevinhng86

Member
Registered
Joined
Jan 12, 2017
Messages
58
Points
0
kevinhng86
Hello FerdieQO,

Yes I got a working version of the script and thank you for the idea. It will do what you want it to do. I started a new thread on that already. Please do test it out and tell me how you think about it or how it's can be extend in features. What I wrote was also a framework that you can connect to twitter not just get the userId or userName. However I for now will just leave the feature to getting the userId or userName for now.
 
Newer Threads
Latest Threads
Replies
0
Views
122
Replies
0
Views
65
Replies
0
Views
58
Replies
1
Views
87

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top