diff options
author | Vitaly Takmazov | 2018-01-19 11:00:32 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-01-19 11:00:32 +0300 |
commit | 6975adcb0c8e685c44cb1f3d18a60140fbc980c1 (patch) | |
tree | 474890da88090980792a9411271df25f23c32567 /juick-api/src/main/java | |
parent | 1161a7c70b1418982c63c554ab3f4d77658442f9 (diff) |
fb: cleanup config keys
Diffstat (limited to 'juick-api/src/main/java')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/FacebookPageManager.java | 6 |
1 files changed, 2 insertions, 4 deletions
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<String> response = api.exchange(uriComponents.toUri(), HttpMethod.POST, null, String.class); logger.info("Facebook response: {}", response.getBody()); |