diff options
author | emkael <emkael@tlen.pl> | 2019-06-13 00:59:35 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-06-13 00:59:35 +0200 |
commit | 43c399e8acc208c17096836e516886bdf73f9f11 (patch) | |
tree | ca2f2614456ab35dcb0e49cef9c516c79b04a55c /providers/Facebook.php | |
parent | b22a686ec370f2e6bc6e2a827cc3877e99d446a0 (diff) |
FFS.
Diffstat (limited to 'providers/Facebook.php')
-rw-r--r-- | providers/Facebook.php | 5 |
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 = []; |