[FacebookBridge] Use alternative URI to load more posts

The URI "https://facebook.com/username?_fb_noscript=1" returns two
posts per user. Some profiles, however, are very active, causing the
bridge to miss items if more than two posts are send within the cache
duration (5 minutes).

The alternative suggested in #669 is to use a different URI:
"https://facebook.com/pg/username/posts?_fb_noscript=1"

While the contents of this URI essentially look the same when viewed
in a browser, it actually returns more than 10 posts depending on the
profile.

References #669
This commit is contained in:
logmanoriginal 2018-09-26 18:24:43 +02:00
parent e1c4914b1c
commit fcc9f9fd61

View file

@ -86,7 +86,7 @@ class FacebookBridge extends BridgeAbstract {
$user = $this->sanitizeUser($this->getInput('u'));
if(!strpos($user, '/')) {
$uri .= urlencode($user);
$uri .= '/pg/' . urlencode($user) . '/posts';
} else {
$uri .= 'pages/' . $user;
}
@ -497,7 +497,6 @@ EOD;
->find('#pagelet_timeline_main_column')[0]
->children(0)
->children(0)
->children(0)
->next_sibling()
->children(0);