[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fncq9-nTRsaWlFrvDpA3uT9Tlc_VpgNDkMG2zeoPvx34":3},{"slug":4,"display_name":4,"profile_url":5,"plugin_count":6,"total_installs":7,"avg_security_score":8,"avg_patch_time_days":9,"trust_score":10,"computed_at":11,"plugins":12},"azanelli","https:\u002F\u002Fprofiles.wordpress.org\u002Fazanelli\u002F",1,60,85,30,84,"2026-04-05T01:06:28.109Z",[13],{"slug":14,"name":15,"version":16,"author":4,"author_profile":5,"description":17,"short_description":18,"active_installs":7,"downloaded":19,"rating":20,"num_ratings":21,"last_updated":22,"tested_up_to":23,"requires_at_least":24,"requires_php":25,"tags":26,"homepage":25,"download_link":32,"security_score":8,"vuln_count":33,"unpatched_count":33,"last_vuln_date":34,"fetched_at":35},"get-tweets-in-php","Get Tweets in PHP","1.2","\u003Cp>This plugin will add the PHP class \u003Ccode>GetTweetsInPhp\u003C\u002Fcode>. You can use this class as described below for retrieving \u003Cstrong>latest tweets\u003C\u002Fstrong> from a Twitter account, then handle the tweets as you want in your PHP code.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Note\u003C\u002Fstrong>: you should create a Twitter app before using this plugin. You can do it from here: \u003Ca href=\"http:\u002F\u002Fapps.twitter.com\" rel=\"nofollow ugc\">http:\u002F\u002Fapps.twitter.com\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch4>Features\u003C\u002Fh4>\n\u003Cul>\n\u003Cli>Get latest N tweets from a Twitter account.\u003C\u002Fli>\n\u003Cli>Get the tweet’s text formatted as HTML (with links for each entities).\u003C\u002Fli>\n\u003Cli>Cache support.\u003C\u002Fli>\n\u003Cli>Made for developers.\u003C\u002Fli>\n\u003Cli>Really light and simple.\u003C\u002Fli>\n\u003Cli>Works with the v1.1 Twitter API.\u003C\u002Fli>\n\u003Cli>Trivial install\u002Funinstall (only add\u002Fremove the plugin’s files).\u003C\u002Fli>\n\u003Cli>No any data will be permanently stored in your database (only transient data\u003Cbr \u002F>\nif the cache is enabled).\u003C\u002Fli>\n\u003Cli>Proudly coded by \u003Ca href=\"http:\u002F\u002Fnetgloo.com\u002Fen\" rel=\"nofollow ugc\">Netgloo\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch4>Example usage\u003C\u002Fh4>\n\u003Cp>Get and show latest tweets from \u003Ca href=\"http:\u002F\u002Ftwitter.com\u002Fnetglooweb\" rel=\"nofollow ugc\">@netglooweb\u003C\u002Fa>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>\u002F\u002F Set configurations\n$configs = [\n  \u002F\u002F Set here tokens from your Twitter's app\n  'consumer_key' => 'CONSUMER_KEY', \n  'consumer_secret' => 'CONSUMER_SECRET',\n\n  \u002F\u002F The Twitter account name\n  'screen_name' => 'netglooweb',\n\n  \u002F\u002F The number of tweets\n  'count' => 5,\n];\n\n\u002F\u002F Get latest tweets using the function get_tweets\n$tweets = \\Netgloo\\GetTweetsInPhp::get_tweets($configs);\n\n\u002F\u002F ...\n\n\u002F\u002F For each tweet show the HTML text and the attached image\nforeach ($tweets as $tweet) {\n\n  echo \"\u003Cp>\";\n  echo $tweet->n_html_text;\n\n  if ($tweet->n_has_media_photo) {\n    echo \"\u003Cimg src='{$tweet->n_media_photo_url}' width='100%' \u002F>\";\n  }\n\n  echo \"\u003C\u002Fp>\";\n\n}\n\n\u002F\u002F ...\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>That’s all! Have fun!\u003C\u002Fp>\n\u003Ch4>Configurations\u003C\u002Fh4>\n\u003Cp>The \u003Ccode>get_tweets()\u003C\u002Fcode> function takes an array of configurations:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>$configs = [\n\n  \u002F\u002F --- Required ---\n\n  \u002F\u002F The tokens from your Twitter's app\n  'consumer_key' => '...',\n  'consumer_secret' => '...',\n\n  \u002F\u002F The Twitter account name\n  'screen_name' => '...',\n\n\n  \u002F\u002F --- Optional ---\n\n  \u002F\u002F The number of tweets\n  'count' => 20,\n\n  \u002F\u002F Include also the retweets\n  'include_rts' => true,\n\n  \u002F\u002F In the HTML text will be showed \"Retweeted by ...\" if the tweet\n  \u002F\u002F is a retweet\n  'show_retweeted_by' => true,\n\n  \u002F\u002F Enable the cache\n  \u002F\u002F It is recommended to activate the cache, when you put live \n  \u002F\u002F your website, in order to avoid to reach the Twitter's api rate\n  \u002F\u002F limit of 300 requests \u002F 15-min.\n  'cache_enabled' => false,\n\n  \u002F\u002F Cache expiration (in seconds)\n  \u002F\u002F Increase the value to optimize the website's speed, decrease\n  \u002F\u002F the value if you want a more real-time behaviour (but not\n  \u002F\u002F less than 4 seconds to avoid to reach the rate limit).\n  'cache_expiration' => 60,\n\n  \u002F\u002F Templates\n\n  \u002F\u002F Retweeted by text template\n  'retweeted_by_template' => \n    '\u003Cem> Retweeted by {{user_name}}\u003C\u002Fem>',\n\n  \u002F\u002F Hash tag link template\n  'hashtag_link_template' => \n    '\u003Ca href=\"{{hashtag_link}}\" rel=\"nofollow\" target=\"_blank\">' .\n    '#{{hashtag_text}}\u003C\u002Fa>',\n\n  \u002F\u002F Url link template\n  'url_link_template' => \n    '\u003Ca href=\"{{url_link}}\" rel=\"nofollow\" target=\"_blank\" ' .\n    'title=\"{{url_title}}\">{{url_text}}\u003C\u002Fa>',\n\n  \u002F\u002F User mention link template\n  'user_mention_link_template' => \n    '\u003Ca href=\"{{user_mention_link}}\" rel=\"nofollow\" target=\"_blank\" ' .\n    'title=\"{{user_mention_title}}\">@{{user_mention_text}}\u003C\u002Fa>',\n\n  \u002F\u002F Media link template\n  'media_link_template' => \n    '\u003Ca href=\"{{media_link}}\" rel=\"nofollow\" target=\"_blank\" ' .\n    'title=\"{{media_title}}\">{{media_text}}\u003C\u002Fa>'\n\n];\n\n$tweets = \\Netgloo\\GetTweetsInPhp::get_tweets($configs);\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch4>Returned values\u003C\u002Fh4>\n\u003Cp>The \u003Ccode>get_tweets()\u003C\u002Fcode> function will return an Array of tweets. On each tweet object are available these properties:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>n_html_text\u003C\u002Fcode> (String) The tweet text formatted as HTML, with links on each entities.\u003C\u002Fli>\n\u003Cli>\u003Ccode>n_is_retweeted\u003C\u002Fcode> (Boolean) True if the curret tweet is a retweet.\u003C\u002Fli>\n\u003Cli>\u003Ccode>n_has_media_photo\u003C\u002Fcode> (Boolean) True if the current tweet has an attached photo.\u003C\u002Fli>\n\u003Cli>\u003Ccode>n_media_photo_url\u003C\u002Fcode> (String) The url of the tweet’s attached photo.\u003C\u002Fli>\n\u003Cli>\u003Ccode>n_media_photo_urls\u003C\u002Fcode> (Array) If the tweet has more than one attached photos this properties contains all the urls.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Other available properties are those returned from the \u003Ca href=\"https:\u002F\u002Fdev.twitter.com\u002Frest\u002Freference\u002Fget\u002Fstatuses\u002Fuser_timeline\" rel=\"nofollow ugc\">user_timeline Twitter’s API\u003C\u002Fa>.\u003Cbr \u002F>\nThese are some useful ones:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>created_at\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ccode>retweet_count\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ccode>user->name\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ccode>user->screen_name\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ccode>user->profile_image_url\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>If the properties \u003Ccode>n_is_retweeted\u003C\u002Fcode> is true the current tweet is a “re-tweet” and the \u003Ccode>retweeted_status\u003C\u002Fcode> object is available:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>retweeted_status->user->name\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ccode>retweeted_status->user->screen_name\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>\u003Ccode>retweeted_status->retweet_count\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Example\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>This code use some of the above properties:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>\u002F\u002F ...\n\n$tweets = \\Netgloo\\GetTweetsInPhp::get_tweets($configs);\n\nforeach ($tweets as $tweet) {\n  echo $tweet->created_at . \"\u003Cbr\u002F>\";\n  echo $tweet->n_html_text . \"\u003Cbr\u002F>\";\n  if ($tweet->n_has_media_photo) {\n    echo $tweet->n_media_photo_url  . \"\u003Cbr\u002F>\";\n  }\n}\n\n\u002F\u002F ...\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch4>Limitations\u003C\u002Fh4>\n\u003Cp>Since we rely on the Twitter’s \u003Ccode>user_timeline\u003C\u002Fcode> API, you should read the following docs for taking in account any API’s limitation:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>https:\u002F\u002Fdev.twitter.com\u002Frest\u002Freference\u002Fget\u002Fstatuses\u002Fuser_timeline\u003C\u002Fli>\n\u003Cli>https:\u002F\u002Fdev.twitter.com\u002Frest\u002Fpublic\u002Ftimelines\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch4>Contributing\u003C\u002Fh4>\n\u003Cp>For patches, bug reports, suggestions, requests for features there is a Git repository on GitHub here:\u003Cbr \u002F>\nhttps:\u002F\u002Fgithub.com\u002Fnetgloo\u002Fget-tweets-in-php\u003C\u002Fp>\n","Get latest tweets from a Twitter account with a couple of lines of PHP, and do anything you want with them.",3042,100,2,"2016-12-28T14:59:00.000Z","4.7.32","4.0","",[27,28,29,30,31],"developers","latest-tweets","tweet","tweets","twitter","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Fget-tweets-in-php.1.2.zip",0,null,"2026-03-15T15:16:48.613Z"]