2

I have successfully implemented the twitter API on my website:

API used: Twitter oAuth by Abraham Williams

http://fr.illustranews.com

I have asked for extended permission from twitter to be able to get the email of logged users.

However when I look the response from twitter, I do not find the email.

Here is the response:

stdClass Object (
    [id] => 159518456 
    [id_str] => 159518456 
    [name] => Mautech Consulting 
    [screen_name] => Mau_tech 
    [location] => Viney road, Calodyne,Mauritius 
    [description] => Your IT Consulting expert. We are the creators of http://t.co/lCXGEiOsrT 
    [url] => http://t.co/vFV9W9m5NJ 
    [entities] => stdClass Object ( 
        [url] => stdClass Object ( 
            [urls] => Array ( 
                [0] => stdClass Object ( 
                    [url] => http://t.co/vFV9W9m5NJ 
                    [expanded_url] => http://www.mautechconsulting.com 
                    [display_url] => mautechconsulting.com 
                    [indices] => Array ( [0] => 0 [1] => 22 
                ) 
            ) 
        ) 
    ) 
    [description] => stdClass Object ( 
    [urls] => Array ( 
        [0] => stdClass Object ( 
            [url] => http://t.co/lCXGEiOsrT 
            [expanded_url] => http://www.professionals.mu 
            [display_url] => professionals.mu 
            [indices] => Array ( [0] => 50 [1] => 72 ) ) ) ) ) 
    [protected] => 
    [followers_count] => 1403 
    [friends_count] => 1805 
    [listed_count] => 5 
    [created_at] => Fri Jun 25 16:14:34 +0000 2010 
    [favourites_count] => 2 
    [utc_offset] => 14400 
    [time_zone] => Abu Dhabi 
    [geo_enabled] => 
    [verified] => 
    [statuses_count] => 341 
    [lang] => en 
    [status] => stdClass Object ( 
        [created_at] => Fri Mar 11 09:08:37 +0000 2016 
        [id] => 708218057567682560 
        [id_str] => 708218057567682560 
        [text] => VPS Hosting | Windows Cloud Hosting | Windows Reseller - AccuWeb Hosting https://t.co/0exTmiLClc 
        [truncated] => 
        [source] => Facebook 
        [in_reply_to_status_id] => 
        [in_reply_to_status_id_str] => 
        [in_reply_to_user_id] => [
        in_reply_to_user_id_str] => 
        [in_reply_to_screen_name] => 
        [geo] => 
        [coordinates] => 
        [place] => 
        [contributors] => 
        [is_quote_status] => 
        [retweet_count] => 0 
        [favorite_count] => 0 
        [entities] => stdClass Object ( 
            [hashtags] => Array ( ) 
            [symbols] => Array ( ) 
            [user_mentions] => Array ( ) 
            [urls] => Array ( 
                [0] => stdClass Object ( 
                    [url] => https://t.co/0exTmiLClc 
                    [expanded_url] => http://fb.me/4uCDHL6lZ 
                    [display_url] => fb.me/4uCDHL6lZ 
                    [indices] => Array ( [0] => 73 [1] => 96 ) 
                ) 
            ) 
        ) 
        [favorited] => 
        [retweeted] => 
        [possibly_sensitive] => 
        [lang] => en 
    ) 
    [contributors_enabled] => 
    [is_translator] => 
    [is_translation_enabled] => 
    [profile_background_color] => F0F5F5 
    [profile_background_image_url] => http://pbs.twimg.com/profile_background_images/436354814457303040/nOQaWO-w.png 
    [profile_background_image_url_https] => https://pbs.twimg.com/profile_background_images/436354814457303040/nOQaWO-w.png 
    [profile_background_tile] => 
    [profile_image_url] => http://pbs.twimg.com/profile_images/378800000801085164/b77fd09a53c4dcca068297874728c2fb_normal.png 
    [profile_image_url_https] => https://pbs.twimg.com/profile_images/378800000801085164/b77fd09a53c4dcca068297874728c2fb_normal.png 
    [profile_link_color] => 0084B4 
    [profile_sidebar_border_color] => FFFFFF 
    [profile_sidebar_fill_color] => DDFFCC 
    [profile_text_color] => 333333 
    [profile_use_background_image] => 1 
    [has_extended_profile] => 
    [default_profile] => 
    [default_profile_image] => 
    [following] => 
    [follow_request_sent] => 
    [notifications] => 
)

Can you please help?

Tomasz Ferfecki
  • 1,263
  • 14
  • 22

1 Answers1

0

It is not possible to get email address of a user using the Twitter API, unless your app is white-listed.

Check this SO answer: https://stackoverflow.com/a/3627563/5663598 And the links from that answers as a reference:

API call details: https://dev.twitter.com/rest/reference/get/account/verify_credentials

Community
  • 1
  • 1
henningmu
  • 36
  • 4