Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Facebook login exception after API 2.9 is disabled #278

Open
mihajul opened this issue Aug 6, 2019 · 3 comments · May be fixed by #279
Open

Facebook login exception after API 2.9 is disabled #278

mihajul opened this issue Aug 6, 2019 · 3 comments · May be fixed by #279

Comments

@mihajul
Copy link

mihajul commented Aug 6, 2019

We started getting the following exception when trying to login with facebook.
As a workaround we removed "context" from the PROFILE_FIELDS array in UserOperations.java

`

org.springframework.social.UncategorizedApiException: (#100) Tried accessing nonexisting field (context) on node type (User)

org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleFacebookError(FacebookErrorHandler.java:91)
org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleError(FacebookErrorHandler.java:59)
org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:709)
org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:662)
org.springframework.web.client.RestTemplate.execute(RestTemplate.java:637)
org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:312)
org.springframework.social.facebook.api.impl.FacebookTemplate.fetchObject(FacebookTemplate.java:225)
org.springframework.social.facebook.api.impl.FacebookTemplate.fetchObject(FacebookTemplate.java:220)
org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:53)
org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:49)
org.springframework.social.facebook.connect.FacebookAdapter.fetchUserProfile(FacebookAdapter.java:50)
org.springframework.social.facebook.connect.FacebookAdapter.fetchUserProfile(FacebookAdapter.java:30)
org.springframework.social.connect.support.AbstractConnection.fetchUserProfile(AbstractConnection.java:111)
`

@mihajul mihajul linked a pull request Aug 6, 2019 that will close this issue
@SimonCigoj
Copy link

@mihajul how dod you do this I have the same problem?

@mihajul
Copy link
Author

mihajul commented Aug 12, 2019

@mihajul how dod you do this I have the same problem?

I added the following file in the "src/main/java/org/springframework/social/facebook/api/" folder inside my project:

https://github.com/mihajul/spring-social-facebook/blob/d11eac37f3a79f74ef7b65576ae49b73a463e232/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/UserOperations.java

@mathieuruellan
Copy link

@mihajul Thank you! Works fine for me!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants