summaryrefslogtreecommitdiff
path: root/providers
diff options
context:
space:
mode:
Diffstat (limited to 'providers')
-rw-r--r--providers/Facebook.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/providers/Facebook.php b/providers/Facebook.php
index a37af27..eb13b11 100644
--- a/providers/Facebook.php
+++ b/providers/Facebook.php
@@ -10,11 +10,12 @@ class Facebook extends \Providers\Provider {
protected $_cacheTimeout = '10 seconds';
private $_api;
+ private $_config;
public function __construct($feed, $options=[]) {
parent::__construct($feed, $options);
- $config = json_decode(file_get_contents('../config/facebook.json'), TRUE);
- $this->_api = new \Facebook\Facebook($config);
+ $this->_config = json_decode(file_get_contents('../config/facebook.json'), TRUE);
+ $this->_api = new \Facebook\Facebook($this->_config);
}
protected function _getCachePath() {
@@ -24,7 +25,7 @@ class Facebook extends \Providers\Provider {
protected function _fetchItems() {
$request = new \Facebook\FacebookRequest(
$this->_api->getApp(),
- $this->_api->getApp()->getAccessToken(),
+ $this->_config['user_token'],
'GET',
sprintf('/%s/posts', $this->_feed)
);