summaryrefslogtreecommitdiff
path: root/providers/Facebook.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-06-13 00:59:35 +0200
committeremkael <emkael@tlen.pl>2019-06-13 00:59:35 +0200
commit43c399e8acc208c17096836e516886bdf73f9f11 (patch)
treeca2f2614456ab35dcb0e49cef9c516c79b04a55c /providers/Facebook.php
parentb22a686ec370f2e6bc6e2a827cc3877e99d446a0 (diff)
FFS.
Diffstat (limited to 'providers/Facebook.php')
-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 = [];