检查用户是否通过 twitter api 在 twitter 中得到验证 [英] check if a user is verified in twitter by twitter api

查看:33
本文介绍了检查用户是否通过 twitter api 在 twitter 中得到验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个项目来确定用户是否是 Twitter 上的名人.有什么方法可以检查 Twitter 中的用户是否被验证为名人?我知道名人会在 Twitter 个人资料中用蓝色徽章标识.但是如何通过 Twitter API 检索信息并查看是否有蓝色徽章?

I am doing a project to identify if a user is a celebrity in Twitter. Are there any ways to check if a user in Twitter is verified as celebrity? I know a celebrity would identified with a blue badge in the twitter profile. But how could I retrieve the information through Twitter API and see if there is a blue badge?

推荐答案

每个 Twitter 用户对象 来自 /users/show 带有一个 verified 布尔字段.如果用户通过验证,则为true;否则它将是 false.

Each Twitter user object from /users/show comes with a verified boolean field. If the user is verified, it will be true; otherwise it will be false.

例如,来自我的 Twitter 个人资料的典型回复可能如下所示:

For example, a typical response from my Twitter profile might look like:

{
  "name": "John Feminella",
  "screen_name": "jxxf",
  # ...
  "verified": true,          # True if the user is verified, false otherwise.
  # ...
}

这篇关于检查用户是否通过 twitter api 在 twitter 中得到验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆