[FacebookBridge] Permalink fix (#1838)
Also removing timestamp which does not work
This commit is contained in:
parent
0655b3cb39
commit
efe32aad22
1 changed files with 2 additions and 11 deletions
|
@ -203,7 +203,6 @@ class FacebookBridge extends BridgeAbstract {
|
||||||
$item['title'] = $this->extractGroupPostTitle($post);
|
$item['title'] = $this->extractGroupPostTitle($post);
|
||||||
$item['author'] = $this->extractGroupPostAuthor($post);
|
$item['author'] = $this->extractGroupPostAuthor($post);
|
||||||
$item['content'] = $this->extractGroupPostContent($post);
|
$item['content'] = $this->extractGroupPostContent($post);
|
||||||
$item['timestamp'] = $this->extractGroupPostTimestamp($post);
|
|
||||||
$item['enclosures'] = $this->extractGroupPostEnclosures($post);
|
$item['enclosures'] = $this->extractGroupPostEnclosures($post);
|
||||||
|
|
||||||
$this->items[] = $item;
|
$this->items[] = $item;
|
||||||
|
@ -282,7 +281,8 @@ class FacebookBridge extends BridgeAbstract {
|
||||||
|
|
||||||
// Find the one that is a permalink
|
// Find the one that is a permalink
|
||||||
if(strpos($anchor->href, 'permalink') !== false) {
|
if(strpos($anchor->href, 'permalink') !== false) {
|
||||||
return $anchor->href;
|
$arr = explode('?', $anchor->href, 2);
|
||||||
|
return $arr[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -304,15 +304,6 @@ class FacebookBridge extends BridgeAbstract {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function extractGroupPostTimestamp($post) {
|
|
||||||
|
|
||||||
$element = $post->find('abbr', 0)
|
|
||||||
or returnServerError('Unable to find timestamp!');
|
|
||||||
|
|
||||||
return $element->plaintext;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private function extractGroupPostAuthor($post) {
|
private function extractGroupPostAuthor($post) {
|
||||||
|
|
||||||
$element = $post->find('h3 a', 0)
|
$element = $post->find('h3 a', 0)
|
||||||
|
|
Loading…
Reference in a new issue