diff options
author | emkael <emkael@tlen.pl> | 2017-01-16 23:43:29 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-01-16 23:43:29 +0100 |
commit | df7de5249540a4d0efbf6546b44c5cd8ee9306d1 (patch) | |
tree | f5bd8007380057b0daccf75e478e6b14740fef42 /providers | |
parent | b04369fcb1d79aa5c4e131a8b5b4185b44f4b598 (diff) |
* using FB user token to by-pass age restriction
Diffstat (limited to 'providers')
-rw-r--r-- | providers/Facebook.php | 7 |
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) ); |