{"id":21893731,"url":"https://github.com/micc83/twitter-api-1.1-client-for-wordpress","last_synced_at":"2025-04-15T15:22:24.365Z","repository":{"id":8919090,"uuid":"10646482","full_name":"micc83/Twitter-API-1.1-Client-for-Wordpress","owner":"micc83","description":"A simple class to query Twitter API v1.1 from WordPress with caching","archived":false,"fork":false,"pushed_at":"2013-11-15T13:52:09.000Z","size":245,"stargazers_count":38,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T19:07:22.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micc83.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-12T16:01:41.000Z","updated_at":"2023-08-22T17:09:47.000Z","dependencies_parsed_at":"2022-08-27T22:31:25.839Z","dependency_job_id":null,"html_url":"https://github.com/micc83/Twitter-API-1.1-Client-for-Wordpress","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micc83%2FTwitter-API-1.1-Client-for-Wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micc83%2FTwitter-API-1.1-Client-for-Wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micc83%2FTwitter-API-1.1-Client-for-Wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micc83%2FTwitter-API-1.1-Client-for-Wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micc83","download_url":"https://codeload.github.com/micc83/Twitter-API-1.1-Client-for-Wordpress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249095245,"owners_count":21211890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T13:16:25.408Z","updated_at":"2025-04-15T15:22:24.344Z","avatar_url":"https://github.com/micc83.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Twitter API 1.1 Client for Wordpress\n====================================\n\nA simple class to query Twitter API v1.1 from WordPress with caching. \n\n## Documentation\n\nAs first go to https://dev.twitter.com/apps, create an application and get both **consumer_key** and **consumer_secret**.\nAfter that just include **class-wp-twitter-api.php** in your plugin or theme folder.\nThat's it, check the following example, to understand how Wp_Twitter_Api works.\n\n### Example\n\n```php\n\u003c?php\n\n// Include Twitter API Client\nrequire_once( 'class-wp-twitter-api.php' );\n\n// Set your personal data retrieved at https://dev.twitter.com/apps\n$credentials = array(\n  'consumer_key' =\u003e 'xxxxxxxxxxxxxxxx',\n  'consumer_secret' =\u003e 'xxxxxxxxxxxxxxxx'\n);\n\n// Let's instantiate Wp_Twitter_Api with your credentials\n$twitter_api = new Wp_Twitter_Api( $credentials );\n\n// Example a - Retrieve last 5 tweets from my timeline (default type statuses/user_timeline)\n$query = 'count=5\u0026include_entities=true\u0026include_rts=true\u0026screen_name=micc1983';\nvar_dump( $twitter_api-\u003equery( $query ) );\n\n// Example b - Retrieve my follower with a cache of 24 hour (default 30 minutes)\n$query = 'screen_name=micc1983';\n$args = array(\n  'type' =\u003e 'users/show',\n  'cache' =\u003e ( 24 * 60 * 60 )\n);\n$result = $twitter_api-\u003equery( $query, $args );\necho $result-\u003efollowers_count;\n```\nFor a full list of Twitter API 1.1 resources check here: https://dev.twitter.com/docs/api/1.1 while for testing you can take advantage of Twitter API Console here: https://dev.twitter.com/console\n\n## Support and contacts\n\nIf you need support you can find me on [twitter](https://twitter.com/Micc1983) or comment on the dedicated page on my [website](http://codeb.it/come-accedere-alle-nuove-api-1-1-di-twitter-con-wordpress/).\n\n## Changelog\n\n* Fixed a bug of transients not handling correctly unicode characters, pointed out by [Justin Hebb](http://wwww.jukah.com) on http://codeb.it/come-accedere-alle-nuove-api-1-1-di-twitter-con-wordpress/#comment-294\n\n## Notes\n\nIf you get the error `SSL3_GET_SERVER_CERTIFICATE:certificate verify failed` give a look to the smart solution figured out by @franz-josef-kaiser [here](https://plus.google.com/107110219316412982437/posts/gTdK4MrnKUa).\n```php\nadd_filter( 'https_ssl_verify', '__return_false' );\nadd_filter( 'https_local_ssl_verify', '__return_false' );\n```\nThank you @pdewouters for pointing it out!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicc83%2Ftwitter-api-1.1-client-for-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicc83%2Ftwitter-api-1.1-client-for-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicc83%2Ftwitter-api-1.1-client-for-wordpress/lists"}