Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

deepness's avatar

Socialite Twitter Email NULL problem

I have problem with getting email from Twitter Email with Laravel Socialite. Here the result when I try

http://i.imgur.com/erwg1Wa.png

My code $get = Socialite::driver("twitter")->user(); dd($get ->getEmail());

0 likes
9 replies
rickyryden's avatar

You can't get the email address from Twitter, they don't give it to you through the API so you have to ask the user when they sign up.

1 like
rickyryden's avatar

I'm sorry for my answer, I googled like crazy when I tried to get email addresses from Twitter API (earlier this year) and everyone said that it's not possible... Is that something new @thomaskim ?

thomaskim's avatar

@rickyryden I just found out recently myself so I'm not sure when they started doing this. It does look like a recent thing though (2015?).

1 like
deepness's avatar
deepness
OP
Best Answer
Level 1

Finally I fix it. Firstly we need to type a Privacy Policy URL and Terms of Service URL and logo. Then open the permissions tab http://prntscr.com/8xcx4y click Request email addresses from users checkbox. Thats it!

10 likes
sujaymondal9's avatar
  1. Go to Settings tab and put Privacy Policy URL and Terms of Service URL
  2. Go to permission tab checked Request email addresses from users http://prntscr.com/du6wew

Update your settings, it will work fine.

Please or to participate in this conversation.