From 072a4e3a29ef8d3fcbaddd1ddaa64347ae10ba3c Mon Sep 17 00:00:00 2001 From: Alexey Nesterov Date: Tue, 24 Apr 2018 20:37:00 +0100 Subject: [PATCH] Upgrade to Facebook Graph API 2.8 v2.8 will be available till April 18, 2019 so users will have enough time to upgrade to version 3 of Spring Social with support of the most up to date Facebook API version Fixes #241 and #217 --- .../java/org/springframework/social/facebook/api/User.java | 2 ++ .../springframework/social/facebook/api/UserOperations.java | 4 ++-- .../social/facebook/api/impl/FacebookTemplate.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/User.java b/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/User.java index b1abe127c..47a215411 100644 --- a/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/User.java +++ b/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/User.java @@ -291,7 +291,9 @@ public String getAbout() { * The user's bio. * Available only with "user_about_me" permission for the authenticated user. * @return the user's bio, if available. + * @deprecated this field is deprecated in Facebook API and always returns null, use the {@link #getAbout()} field instead. */ + @Deprecated public String getBio() { return bio; } diff --git a/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/UserOperations.java b/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/UserOperations.java index c1aa5b1f4..73533949d 100644 --- a/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/UserOperations.java +++ b/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/UserOperations.java @@ -126,8 +126,8 @@ public interface UserOperations { */ PagedList search(String query); - static final String[] PROFILE_FIELDS = { - "id", "about", "age_range", "bio", "birthday", "context", "cover", "currency", "devices", "education", "email", + String[] PROFILE_FIELDS = { + "id", "about", "age_range", "birthday", "context", "cover", "currency", "devices", "education", "email", "favorite_athletes", "favorite_teams", "first_name", "gender", "hometown", "inspirational_people", "installed", "install_type", "is_verified", "languages", "last_name", "link", "locale", "location", "meeting_for", "middle_name", "name", "name_format", "political", "quotes", "payment_pricepoints", "relationship_status", "religion", "security_settings", "significant_other", diff --git a/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/FacebookTemplate.java b/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/FacebookTemplate.java index 9ef79fa4e..86f945a32 100644 --- a/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/FacebookTemplate.java +++ b/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/FacebookTemplate.java @@ -108,7 +108,7 @@ public class FacebookTemplate extends AbstractOAuth2ApiBinding implements Facebo private String applicationNamespace; - private String apiVersion = "2.5"; + private String apiVersion = "2.8"; /** * Create a new instance of FacebookTemplate.