---
title: "Spring social Facebook oauth - getting not all data with api v2.5"  
description: "Spring social Facebook oauth - getting not all data with api v2.5"  
author: "Anonymous User"  
published: 2015-12-11  
updated: 2015-12-11  
canonical: https://www.mindstick.com/forum/33718/spring-social-facebook-oauth-getting-not-all-data-with-api-v2-5  
category: "java"  
tags: ["java"]  
reading_time: 2 minutes  

---

# Spring social Facebook oauth - getting not all data with api v2.5

I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to implement facebook oauth using Spring Social, as a part of it I call the following uri\
https://www.facebook.com/v1.0/dialog/oauth?client_id=12345678900&response_type=code&redirect_uri=http://some_uri.com&success_url=some_uri.com&error_url=some_uri.com&scope=email%2C+user_birthday\
And I get the token just fine. However, when I try\

```
Facebook facebookTemplate = new FacebookTemplate(accessToken);FacebookProfile facebookProfile = facebook.userOperations().getUserProfile();
```

The api returns the full facebook [profile](https://www.mindstick.com/articles/44686/how-to-write-a-profile-essay) with all the data (email, link etc) only in case if I've configured my app to use [Facebook app](https://answers.mindstick.com/qa/50435/how-to-fix-facebook-app-that-keeps-crashing-on-your-iphone-x) in [developers](https://www.mindstick.com/articles/12875/blunders-you-must-avoid-while-hiring-java-developers-to-get-the-best-fulfilling-your-needs) [console](https://www.mindstick.com/blog/210/the-console-class) which uses api 2.3. As for today the up-to-date [version](https://www.mindstick.com/articles/12845/things-to-remember-while-migrating-odoo-to-a-better-version) of api which is used by all newly created apps in the console is 2.5. In case I use newly created app with api 2.5 it returns not all data - basically only user [name and id](https://www.mindstick.com/forum/34671/android-facebook-login-api-returns-only-name-and-id) are present. I use Spring social facebook version 1.1.1.RELEASE and Spring social 1.1.0.RELEASE\
Can I specify some [parameter](https://www.mindstick.com/blog/450/parameter-class-in-c-sharp) or update [libraries](https://answers.mindstick.com/qa/49244/which-company-is-ahead-in-classification-of-data-for-libraries-innovations) or code, so that I get all the data using newly created apps with api version 2.5?

## Replies

### Reply by Anonymous User

Spring Social Facebook v2.0.3.RELEASE targets Graph API v2.5 and should include the fields you are looking for.You are missing the scope. By default scope of spring-social-facebook is public_profile. It will only have some limited information.\
Use "email scope" instead. Refer this link [Facebook oauth scopes](https://developers.facebook.com/docs/facebook-login/permissions)\
You can change the scope in this way facebookConnectionFactory.setScope("email")


---

Original Source: https://www.mindstick.com/forum/33718/spring-social-facebook-oauth-getting-not-all-data-with-api-v2-5

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
