aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api/FacebookPageManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/FacebookPageManager.java')
-rw-r--r--juick-api/src/main/java/com/juick/api/FacebookPageManager.java6
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());