From c56f7abc2a368b2bf1b7af80b499f8baebd1b86d Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 24 Oct 2018 17:23:09 +0200 Subject: [PATCH] [FacebookBridge] Reduce occurrence of HTTP error 302 Facebook returns "HTTP/1.1 302 Found" when requesting: https://www.facebook.com//pg/username/posts?_fb_noscript=1 Automatically redirecting to: https://www.facebook.com/username/posts/ We receive a positive response faster when directly requesting the correct page: https://www.facebook.com/username/posts?_fb_noscript=1 Notice: This is just a minor adjustment to improve performance while requesting data from the server. The previous version worked fine as well. --- bridges/FacebookBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/FacebookBridge.php b/bridges/FacebookBridge.php index 277bc608..5160e3f2 100644 --- a/bridges/FacebookBridge.php +++ b/bridges/FacebookBridge.php @@ -95,7 +95,7 @@ class FacebookBridge extends BridgeAbstract { $user = $this->sanitizeUser($this->getInput('u')); if(!strpos($user, '/')) { - $uri .= '/pg/' . urlencode($user) . '/posts'; + $uri .= urlencode($user) . '/posts'; } else { $uri .= 'pages/' . $user; }