Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upgetEmail of org.springframework.social.connect.UserProfile returns null even if additional permissions granted #97
Comments
This comment has been minimized.
This comment has been minimized.
fieder
commented
Mar 18, 2016
|
+1 I'm having exactly the same problem. Twitter exposes the email in the following way, optional parameter include_email But TwitterProfile.java does not have email attribute and should add include_email parameter in the URL. Here's the line where the UserProfile is returned |
This comment has been minimized.
This comment has been minimized.
PawelJagus
commented
Mar 19, 2016
|
I changed the source code by adding |
This comment has been minimized.
This comment has been minimized.
fieder
commented
Mar 19, 2016
|
I've managed to implement the workaround successfully by doing what you describe. I can now retrieve email that way. I've added email attribute to TwitterProfileWithEmail.class which I pass to getForObject. Email is populated. Bear in mind your app must be whitelisted by Twitter first. After that you checkbox email access permission in your app profile. Revoke permission from your user. Login back again, you will see explicit permission for email and after that restTemplate call it works in my case. Good luck! |
This comment has been minimized.
This comment has been minimized.
PawelJagus
commented
Mar 20, 2016
|
Hi, the problem is that my app is whitelisted. I have revoked permission to my app from my user and then granted it once again upon signing up and still nothing... This is how my app permissions look like. |
This comment has been minimized.
This comment has been minimized.
PawelJagus
commented
Mar 20, 2016
|
I have solved it successfully. What had been missing was the following line in the
|
This comment has been minimized.
This comment has been minimized.
RawSanj
commented
Mar 20, 2016
|
@fieder I have the required app permission but I am still not getting email. Response doesn't contain email id:
What is wrong here? |
This comment has been minimized.
This comment has been minimized.
PawelJagus
commented
Mar 20, 2016
|
I receive the email right after
Make sure that you are signing up with your user and not signing in with a user you have already been working with. |
This comment has been minimized.
This comment has been minimized.
fieder
commented
Mar 21, 2016
|
You also need to regenerate all tokens generated in Twitter. Revoke app permission from your user and try to login again to make sure the token generated includes that permission. From my end what I did was Cheers. |
This comment has been minimized.
This comment has been minimized.
RawSanj
commented
Apr 17, 2016
•
|
Thanks @fieder. I regenerated the tokens generated in Twitter and it worked. |
RawSanj
referenced this issue
May 1, 2016
Closed
Twitter Signup Not working due to required Email property in User.java #3511
This comment has been minimized.
This comment has been minimized.
MaveZ
commented
May 20, 2016
|
@PawelJagus Can you explain me how can I implement your solution to my application? I'm using spring-social too but I cannot modify TwitterAdapter since it is a class. |
This comment has been minimized.
This comment has been minimized.
PawelJagus
commented
Jun 8, 2016
|
@MaveZ Sorry for not having answered earlier. I have had a lot to do lately. I will try to find some time to push my changes into GitHub, so you can see what I have changed. I modified the source code in the TwitterAdapter class in order to be able to get the email address from Twitter. |
paulux84
referenced this issue
Jul 19, 2016
Open
account/verify_credentials optional parameters support #105
This comment has been minimized.
This comment has been minimized.
Bessonov
commented
Mar 11, 2017
|
@habuma is twitter integration dead? |
This comment has been minimized.
This comment has been minimized.
keyuls
commented
Jun 27, 2018
|
Is it fix or still the issue? |
This comment has been minimized.
This comment has been minimized.
AlexBondor
commented
Jun 28, 2018
|
It is but.. is there an updated dependency pushed anywhere so I could fetch it instead of doing the changes locally and publishing to local m2 repository? |
PawelJagus commentedMar 9, 2016
Hi, I have been granted an email request from a user of my app. I have activated "Request email addresses from users" in my Twitter app settings.
After this change the implementation of org.springframework.social.connect.UserProfile for Twitter still returns null when getEmail method is called.