{"id":13744706,"url":"https://github.com/susisu/Twitter-for-AS3","last_synced_at":"2025-05-09T03:33:11.275Z","repository":{"id":7708495,"uuid":"9073362","full_name":"susisu/Twitter-for-AS3","owner":"susisu","description":"(no longer maintained) ActionScript3 library for Twitter API v1.1","archived":true,"fork":false,"pushed_at":"2015-12-09T17:17:24.000Z","size":66,"stargazers_count":33,"open_issues_count":13,"forks_count":6,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-08-04T05:04:45.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/susisu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-28T08:54:34.000Z","updated_at":"2023-01-28T18:43:56.000Z","dependencies_parsed_at":"2022-09-02T10:01:09.725Z","dependency_job_id":null,"html_url":"https://github.com/susisu/Twitter-for-AS3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susisu%2FTwitter-for-AS3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susisu%2FTwitter-for-AS3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susisu%2FTwitter-for-AS3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susisu%2FTwitter-for-AS3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/susisu","download_url":"https://codeload.github.com/susisu/Twitter-for-AS3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224811138,"owners_count":17373916,"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-08-03T05:01:14.527Z","updated_at":"2024-11-15T16:31:36.798Z","avatar_url":"https://github.com/susisu.png","language":"ActionScript","readme":"Twitter for AS3\r\n===============\r\nActionScript 3 library for Twitter API v1.1\r\n\r\nThis is an *unofficial* project. Don't ask your question to the Twitter official.\r\n\r\n# Requirements\r\n* [as3crypto](http://code.google.com/p/as3crypto/)\r\n\r\n# Usage\r\n## First steps\r\nIf you are not used to dealing with Twitter authentication and APIs, it may help you reading the [documentation](https://dev.twitter.com/overview/documentation) of Twitter.\r\n\r\n1.\r\nGet the consumer key and the consumer secret for your application.\r\n\r\nPlease login to https://dev.twitter.com/ with your twitter account and create or select your application.\r\nYou can get the keys from \"Keys and Access Tokens\" tab of the your app's page.\r\n\r\n2.\r\nCreate an instance of `Twitter` class.\r\n\r\n*If you already have access tokens, please go to 6*.\r\n\r\nSpecify your keys to its arguments.\r\n``` actionscript\r\nvar twitter:Twitter = new Twitter(\u003cyour consumer key\u003e, \u003cyour consumer secret\u003e);\r\n```\r\n\r\n3.\r\nGet the request token and the request token secret.\r\n\r\nFirst, send a request by `twitter.oauth_requestToken()`\r\n``` actionscript\r\nvar rtRequest:TwitterRequest = twitter.oauth_requestToken();\r\n```\r\nand add an event listener for `TwitterRequestEvent.COMPLETE` to `rtRequest`.\r\n``` actionscript\r\nrtRequest.addEventListener(TwitterRequestEvent.COMPLETE, \u003clistener\u003e);\r\n```\r\n\r\nAs the request is complete, you can get the URL to authenticate the app on your account by\r\n``` actionscript\r\ntwitter.getOAuthAuthorizeURL();\r\n```\r\nand open the URL in your browser.\r\n\r\nAfter authentication you get a PIN, that is used in the next step.\r\n\r\n4.\r\nGet the access token and the access token secret.\r\n\r\nLet `pin` be the PIN you've get, send a request by `twitter.oauth_accessToken()`\r\n``` actionscript\r\nvar atRequest:TwitterRequest = twitter.oauth_accessToken(pin);\r\n```\r\nand also add an event listener for `TwitterRequestEvent.COMPLETE` to `atRequest`.\r\n``` actionscript\r\natRequest.addEventListener(TwitterRequestEvent.COMPLETE, \u003clistener\u003e);\r\n```\r\n\r\nIf it's complete, you are ready to use the REST APIs.\r\n\r\n5.\r\nFor a test, try to post a tweet.\r\n\r\n``` actionscript\r\ntwitter.statuses_update(\"Hello!\");\r\n```\r\n\r\n6.\r\nIf you already have the access token and the access token secret, you can sepcify them when you create an `Twitter` instance.\r\n``` actionscript\r\nvar twitter:Twitter = new Twitter(\u003cconsumer key\u003e, \u003cconsumer secret\u003e, \u003caccess token\u003e, \u003caccess token secret\u003e);\r\n```\r\nThen you can use the REST APIs immediately.\r\n\r\n## Error handling\r\nTo handle errors, add an event listener for `TwitterErrorEvent` to the request.\r\nThis is an example for handling client errors (HTTP 4xx), and you can also handle server errors (HTTP 5xx) with `TwitterErrorEvent.SERVER_ERROR` in the same way.\r\n``` actionscript\r\nvar request:TwitterRequest = twitter.statuses_update(...);\r\nrequest.addEventListener(TwitterErrorEvent.CLIENT_ERROR,\r\n    function(event:TwitterErrorEvent):void\r\n    {\r\n        /* error handling code here */\r\n        event.preventDefault();\r\n    }\r\n);\r\n```\r\n\r\n# Example\r\nAn example app is in `example` directory.\r\n\r\n# License\r\nThe MIT License\r\n\r\n# Author\r\nSusisu ([Twitter](https://twitter.com/susisu2413), [GitHub](https://github.com/susisu))\r\n","funding_links":[],"categories":["API"],"sub_categories":["Twitter API"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusisu%2FTwitter-for-AS3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsusisu%2FTwitter-for-AS3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusisu%2FTwitter-for-AS3/lists"}