X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=twitter%2Ftwitter.php;h=d846b1ada1afef4f5dd5c7b7ce209942389f1766;hb=a97eeb8e8b4cb831677990f1bbbd43b3d756da05;hp=eeee6cafcde94d04649d92daec36fe7876b64475;hpb=1a39ce3997f071ae935b2133d91170b1e2799c91;p=friendica-addons.git diff --git a/twitter/twitter.php b/twitter/twitter.php index eeee6caf..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, [