{"id":20386978,"url":"https://github.com/cmdcolin/twitter_fractal_bot","last_synced_at":"2026-06-07T19:32:32.787Z","repository":{"id":57766544,"uuid":"527613713","full_name":"cmdcolin/twitter_fractal_bot","owner":"cmdcolin","description":"Posts random images of fractals to twitter","archived":false,"fork":false,"pushed_at":"2022-09-15T20:19:54.000Z","size":921,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T08:43:16.452Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/cmdcolin.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":"2022-08-22T15:02:49.000Z","updated_at":"2022-09-02T06:38:21.000Z","dependencies_parsed_at":"2022-08-22T19:40:18.071Z","dependency_job_id":null,"html_url":"https://github.com/cmdcolin/twitter_fractal_bot","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/cmdcolin%2Ftwitter_fractal_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdcolin%2Ftwitter_fractal_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdcolin%2Ftwitter_fractal_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdcolin%2Ftwitter_fractal_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmdcolin","download_url":"https://codeload.github.com/cmdcolin/twitter_fractal_bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241936922,"owners_count":20045146,"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-15T02:41:57.819Z","updated_at":"2026-06-07T19:32:29.217Z","avatar_url":"https://github.com/cmdcolin.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# twitter_fractal_bot\n\nPosts images of fractals to twitter at https://twitter.com/chaosbot80\n\n![](img/2.jpeg)\n\nExample image\n\n## How to make your own bot with this code\n\nCreate a .env file with contents like this\n\n```\nAPI_KEY=\"xxxxxxxxxxxxxxxxxxxxxxxxx\"\nAPI_SECRET=\"yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\"\nACCESS_TOKEN=\"aaaaaaaaaaaaaaaaaaa-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\nACCESS_TOKEN_SECRET=\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"\n```\n\nNote 1: The format of these keys is approximately the length of the things that\nare given to you by twitter. The ACCESS_TOKEN as\naaaaaaaaaaaaaaaaaaa-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa is just how it's given to\nyou, it's not two different things\n\nNote 2: The API key is sometimes referred to as \"consumer key\" in other (older)\ntwitter API references.\n\nNote 3: You cannot use the Bearer token to post tweets. Also, there is the\n\"official twitter API SDK\" but this repo does not use it...I wasn't able to\nfigure it out initially but now that I understand OAuth a bit better it may be\npossible to try again to use it\nhttps://github.com/twitterdev/twitter-api-typescript-sdk\n\n![](img/devpanel.png)\n\nSee this blogpost for a couple added details\nhttps://cmdcolin.github.io/posts/2022-08-26-twitterbot\n\nFigure showing where to get the API key+API secret (box 1) and access token+access secret (box 2)\n\n## Usage\n\nRun `yarn post` to make a new post to twitter with a random Figure\n\nRun `yarn gen` to just make a new random image\n\n## Other\n\nMy first twitter bot! I struggled with the code for authenticating properly for\na little while (many references use a OAuth flow that requires a user with a\nweb browser to login or something like this, and there is a lot of vocabulary\nto get used to about OAuth, API key, consumer key, access key, OAuth 1 vs 2,\ntwitter API 1 vs 2, etc.) so this codebase may be a reasonably nice and simple\nexample of \"how to make a twitter bot 2022\". See [src/bot.ts](src/bot.ts) for\nthe twitter bot in particular, it just uploads an image generated by\n[src/index.ts](src/index.ts). This codebase uses twitter API v1 to upload the\nimage, and twitter API v2 to post the image.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmdcolin%2Ftwitter_fractal_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmdcolin%2Ftwitter_fractal_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmdcolin%2Ftwitter_fractal_bot/lists"}