From 6975adcb0c8e685c44cb1f3d18a60140fbc980c1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 19 Jan 2018 11:00:32 +0300 Subject: fb: cleanup config keys --- juick-api/src/main/java/com/juick/api/FacebookPageManager.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'juick-api/src/main/java/com/juick') diff --git a/juick-api/src/main/java/com/juick/api/FacebookPageManager.java b/juick-api/src/main/java/com/juick/api/FacebookPageManager.java index cb16dd0b..e9ed0e59 100644 --- a/juick-api/src/main/java/com/juick/api/FacebookPageManager.java +++ b/juick-api/src/main/java/com/juick/api/FacebookPageManager.java @@ -5,7 +5,6 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriComponents; @@ -14,9 +13,9 @@ import org.springframework.web.util.UriComponentsBuilder; @Component public class FacebookPageManager { private static Logger logger = LoggerFactory.getLogger(FacebookPageManager.class); - @Value("${facebook_page_id}") + @Value("${facebook_page_id:12345678}") private String pageId; - @Value("${facebook_page_access_token}") + @Value("${fb_page_access_token:12345678}") private String accessToken; public void post(String status, String link) { @@ -26,7 +25,6 @@ public class FacebookPageManager { .queryParam("access_token", accessToken) .buildAndExpand(pageId); RestTemplate api = new RestTemplate(); - api.getMessageConverters().add(new MappingJackson2HttpMessageConverter()); ResponseEntity response = api.exchange(uriComponents.toUri(), HttpMethod.POST, null, String.class); logger.info("Facebook response: {}", response.getBody()); -- cgit v1.2.3