X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=twitter%2Ftwitter.php;h=d846b1ada1afef4f5dd5c7b7ce209942389f1766;hb=f96ff32b212a71aff8f55b4b7b75b6948cbaba2b;hp=ac23b84da417a9dd3ea990fb9b495fcd271373c6;hpb=b16f6576c433b2526599928ce723616afc7589de;p=friendica-addons.git diff --git a/twitter/twitter.php b/twitter/twitter.php index ac23b84d..d846b1ad 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -352,7 +352,10 @@ function twitter_settings(App $a, &$s) $field_checkbox = Renderer::getMarkupTemplate('field_checkbox.tpl'); - $s .= '
+ if (property_exists($details, 'screen_name') && + property_exists($details, 'description') && + property_exists($details, 'profile_image_url')) { + $s .= '

' . L10n::t('Currently connected to: ') . '' . $details->screen_name . '

@@ -361,6 +364,12 @@ function twitter_settings(App $a, &$s) ' . $details->description . '

'; + } else { + $s .= '
+

Invalid Twitter info

+
'; + Logger::info('Invalid twitter info (verify credentials).', ['auth' => TwitterOAuth::class]); + } $s .= '
'; $s .= Renderer::replaceMacros($field_checkbox, [ @@ -1900,7 +1909,7 @@ function twitter_update_mentions($body) function twitter_convert_share(array $attributes, array $author_contact, $content, $is_quote_share) { if ($author_contact['network'] == Protocol::TWITTER) { - $mention = '@' . $author_contact['nickname']; + $mention = '@' . $author_contact['nick']; } else { $mention = $author_contact['addr']; }