【问题标题】:Twitter API to search users by their mail idTwitter API 通过邮件 ID 搜索用户
【发布时间】:2012-08-10 22:38:04
【问题描述】:

我正在开发一个应用程序,我想知道是否有任何方法可以通过他/她的邮件 ID 搜索特定用户。 我知道 twitter 曾经提供过这样的 API,但后来考虑到安全问题撤回了它们。 那么有什么方法可以通过注册的电子邮件ID搜索用户吗?

【问题讨论】:

    标签: api search twitter


    【解决方案1】:

    我无法使用tmhOAuth
    这是返回数组,没有看到任何关于电子邮件的信息

    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
    )
    

    【讨论】:

    • 我在 ruby​​ 中发现了一个 gem,它允许使用屏幕名称关注用户。但无法找到如何在 ruby​​ 或 php 或 python 中使用邮件 ID 查找用户。希望有人在这里得到答案
    【解决方案2】:

    根据this discussion 上的Twitter Developers,用户名和用户的电子邮件是两个完全不同的东西。以下引述由 Twitter 技术人员 (@episod) 在讨论中撰写:

    Facebook 和 Google 都基于实际身份——电子邮件 地址在那里很有意义。 Twitter 没有那么牢固地依附于 真实世界的身份——曾经可以说关联的电子邮件地址 有一个帐户比其他任何东西都更像是一种形式,而不是一件 与身份相关的信息 帐户或其所有者。

    因此,您似乎无法通过 Twitter API 使用用户的电子邮件检索用户名。唯一要做的就是向用户发送一封电子邮件,以询问他(或她)的 Twitter 用户名。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-30
      • 2015-12-10
      • 2020-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多