How to just get the username with the screen name?


#1

I have the users’ screen names,and I just need the users’ name in thier profile (although it maybe null). Is there any way to get just like in facebook ?


#2

Yes, using twurl and jq for example…

twurl "/1.1/users/show.json?screen_name=andypiper" | jq '. | {id: .id_str, name: .name, screen_name: .screen_name}'

{
  "id": "786491",
  "name": "Pipes",
  "screen_name": "andypiper"
}

Posted a Gist of this for future reference.


#3