summaryrefslogtreecommitdiff
path: root/providers
diff options
context:
space:
mode:
Diffstat (limited to 'providers')
-rw-r--r--providers/Facebook.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/providers/Facebook.php b/providers/Facebook.php
index f42e32c..0f9afe1 100644
--- a/providers/Facebook.php
+++ b/providers/Facebook.php
@@ -35,10 +35,11 @@ class Facebook extends \Providers\HtmlFeed {
foreach ($tree->find('article') as $header) {
$data = json_decode($header->attr()['data-store'], TRUE)['linkdata'];
$data = json_decode(explode('page_insights.', $data)[1], TRUE);
- $data = array_pop(array_filter(
+ $data = array_filter(
$data,
function($a) { return isset($a['post_context']); }
- ));
+ );
+ $data = array_pop($data);
$data = $data['post_context'];
$key = $data['story_fbid'];
$texts = [];