[英]Twitter API to search users by their mail id
I was developing an application and I was wondering whether there is any way to search a particular user by his/her mail id. 我正在开发一个应用程序,我想知道是否有任何方式可以通过其邮件ID搜索特定用户。 I came to know that twitter once gave such API's but later on withdrew them taking into consideration security issues. 我知道,twitter曾经提供过此类API,但后来考虑到安全性问题将其撤回。 So is there any method by which I can search a user via the registered email id ? 那么,有什么方法可以通过注册的电子邮件ID搜索用户?
i havent been able to using tmhOAuth 我无法使用tmhOAuth
this was the return array and didnt see anything about email 这是返回数组,没有看到有关电子邮件的任何信息
stdClass Object
(
[geo] =>
[favorited] =>
[text] => Don't slip up http://t.co/cndsjkA
[possibly_sensitive] =>
[in_reply_to_status_id_str] =>
[in_reply_to_status_id] =>
[in_reply_to_user_id_str] =>
[in_reply_to_user_id] =>
[truncated] =>
[entities] => stdClass Object
(
[hashtags] => Array
(
)
[user_mentions] => Array
(
)
[media] => Array
(
[0] => stdClass Object
(
[type] => photo
[indices] => Array
(
[0] => 14
[1] => 34
)
[sizes] => stdClass Object
(
[medium] => stdClass Object
(
[resize] => fit
[w] => 360
[h] => 450
)
[thumb] => stdClass Object
(
[resize] => crop
[w] => 150
[h] => 150
)
[small] => stdClass Object
(
[resize] => fit
[w] => 340
[h] => 425
)
[large] => stdClass Object
(
[resize] => fit
[w] => 360
[h] => 450
)
)
[media_url_https] => https://p.twimg.com/****************.jpg
[url] => http://t.co/cndsjkA
[id_str] => ******************
[display_url] => pic.twitter.com/cndsjkA
[id] => ******************
[media_url] => http://p.twimg.com/****************.jpg
[expanded_url] => http://twitter.com/myapp/status/******************/photo/1
)
)
[urls] => Array
(
)
)
[source] => myCompany demo
[retweeted] =>
[retweet_count] => 0
[id_str] => ******************
[coordinates] =>
[user] => stdClass Object
(
[default_profile_image] => 1
[follow_request_sent] =>
[following] =>
[profile_background_color] => C0DEED
[profile_image_url] => http://a0.twimg.com/sticky/default_profile_images/default_profile_3_normal.png
[description] =>
[profile_background_tile] =>
[favourites_count] => 0
[friends_count] => 11
[statuses_count] => 1
[verified] =>
[profile_sidebar_fill_color] => DDEEF6
[notifications] =>
[profile_background_image_url_https] => https://si0.twimg.com/images/themes/theme1/bg.png
[profile_sidebar_border_color] => C0DEED
[url] =>
[location] =>
[listed_count] => 0
[contributors_enabled] =>
[geo_enabled] =>
[profile_image_url_https] => https://si0.twimg.com/sticky/default_profile_images/default_profile_3_normal.png
[id_str] => 595959934
[lang] => en
[profile_use_background_image] => 1
[time_zone] => Atlantic Time (Canada)
[protected] =>
[default_profile] => 1
[profile_text_color] => 333333
[followers_count] => 2
[name] => myCompany
[is_translator] =>
[show_all_inline_media] =>
[profile_background_image_url] => http://a0.twimg.com/images/themes/theme1/bg.png
[screen_name] => myapp
[id] => 595959934
[utc_offset] => -14400
[created_at] => Fri Jun 01 00:21:13 +0000 2012
[profile_link_color] => 0084B4
)
[contributors] =>
[in_reply_to_screen_name] =>
[id] => ******************
[place] =>
[created_at] => Tue Aug 14 15:28:23 +0000 2012
)
According to this discussion on Twitter Developers , the username and the user's e-mail are two totally different things. 根据Twitter Developers上的讨论 ,用户名和用户的电子邮件是完全不同的两件事。 The following quote was written by a Twitter Technician ( @episod ) in the discussion : 以下引用是在讨论中由Twitter技术人员( @episod )撰写的:
Both Facebook and Google are predicated on actual identity -- email address makes a lot of sense there. Facebook和Google都基于实际身份-电子邮件地址在这里很有意义。 Twitter is less firmly attached to real-world identity -- once could say the email address associated with an account is more of a formality than anything else, not a piece of information that's necessarily attached to the identity of the account or its owner. Twitter不太牢固地依赖于真实世界的身份-曾经可以说与帐户相关联的电子邮件地址比其他任何东西都更具有形式性,而不是必定附加于帐户或其所有者身份的信息。
So it seems that you won't be able to retrieve a username through the Twitter API with the user's e-mail. 因此,似乎您将无法通过Twitter API和用户的电子邮件检索用户名。 The only thing to do is sending an e-mail to the user in order to ask him (or her) its Twitter username. 唯一要做的就是向用户发送电子邮件,以询问他(或她)其Twitter用户名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.