簡體   English   中英

Twitter API通過用戶的郵件ID搜索用戶

[英]Twitter API to search users by their mail id

我正在開發一個應用程序,我想知道是否有任何方式可以通過其郵件ID搜索特定用戶。 我知道,twitter曾經提供過此類API,但后來考慮到安全性問題將其撤回。 那么,有什么方法可以通過注冊的電子郵件ID搜索用戶?

我無法使用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
)

根據Twitter Developers上的討論 ,用戶名和用戶的電子郵件是完全不同的兩件事。 以下引用是在討論中由Twitter技術人員( @episod )撰寫的:

Facebook和Google都基於實際身份-電子郵件地址在這里很有意義。 Twitter不太牢固地依賴於真實世界的身份-曾經可以說與帳戶相關聯的電子郵件地址比其他任何東西都更具有形式性,而不是必定附加於帳戶或其所有者身份的信息。

因此,似乎您將無法通過Twitter API和用戶的電子郵件檢索用戶名。 唯一要做的就是向用戶發送電子郵件,以詢問他(或她)其Twitter用戶名。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM