bridges: Cleanup occurrences of $item->thumbnailUri

This is a subsequent change to f3eefab
This commit is contained in:
logmanoriginal 2016-08-09 15:50:25 +02:00
parent e329a4c1b6
commit 42b6c82753
53 changed files with 104 additions and 183 deletions

View file

@ -7,7 +7,7 @@ class FacebookBridge extends BridgeAbstract{
$this->name = "Facebook";
$this->uri = "http://www.facebook.com/";
$this->description = "Input a page title or a profile log. For a profile log, please insert the parameter as follow : myExamplePage/132621766841117";
$this->update = "2016-08-06";
$this->update = "2016-08-09";
$this->parameters[] =
'[
@ -197,15 +197,8 @@ class FacebookBridge extends BridgeAbstract{
if (strlen($title) > 64)
$title = substr($title, 0, strpos(wordwrap($title, 64), "\n")).'...';
//Use first image as thumbnail if available, or profile pic fallback
$thumbnail = $post->find('img', 1);
if (is_object($thumbnail))
$thumbnail = $thumbnail->src;
else $thumbnail = $profilePic;
//Build and add final item
$item->uri = 'https://facebook.com'.$post->find('abbr')[0]->parent()->getAttribute('href');
$item->thumbnailUri = $thumbnail;
$item->content = $content;
$item->title = $title;
$item->author = $author;