]> git.mxchange.org Git - friendica-addons.git/blobdiff - twitter/twitter.php
superblock EN-GB translation THX AndyH3
[friendica-addons.git] / twitter / twitter.php
index f6d5912dd6098ad9d3101816eb99463b636e7203..b38ee92d0fa71ad36447542cbb4e4a0d6920ea4a 100644 (file)
@@ -814,7 +814,7 @@ function twitter_prepare_body(App $a, array &$b)
        if ($b["preview"]) {
                $max_char = 280;
                $item = $b["item"];
-               $item["plink"] = $a->getBaseURL() . "/display/" . $a->user["nickname"] . "/" . $item["parent"];
+               $item["plink"] = $a->getBaseURL() . "/display/" . $item["guid"];
 
                $condition = ['uri' => $item["thr-parent"], 'uid' => local_user()];
                $orig_post = Item::selectFirst(['author-link'], $condition);
@@ -1184,7 +1184,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture)
                                } elseif ($oembed_data->type != 'link') {
                                        $body = str_replace($url->url, '[url=' . $expanded_url . ']' . $url->display_url . '[/url]', $body);
                                } else {
-                                       $img_str = Network::fetchUrl($final_url, true, $redirects, 4);
+                                       $img_str = Network::fetchUrl($final_url, true, 4);
 
                                        $tempfile = tempnam(get_temppath(), 'cache');
                                        file_put_contents($tempfile, $img_str);
@@ -1549,7 +1549,7 @@ function twitter_fetchparentposts(App $a, $uid, $post, TwitterOAuth $connection,
                }
 
                if (empty($post)) {
-                       Logger::log("twitter_fetchparentposts: Can't fetch post " . $parameters->id, Logger::DEBUG);
+                       Logger::log("twitter_fetchparentposts: Can't fetch post " . $parameters['id'], Logger::DEBUG);
                        break;
                }