Check if twitter username exists

前端 未结 9 1602
旧巷少年郎
旧巷少年郎 2021-02-05 10:28

Is there a way to check if a twitter username exists? Without being authenticated with OAuth or the twitter basic authentication?

9条回答
  •  离开以前
    2021-02-05 11:08

    Here is how it works on PHP :

    $user_infos = 'http://api.twitter.com/1/users/show.xml?screen_name='.$username;
    
    if (!@fopen($user_infos, 'r'))
    {
    return false;
    }
    return true;
    

提交回复
热议问题