{"id":15801593,"url":"https://github.com/garrettmac/react-native-tweet","last_synced_at":"2025-04-21T07:33:03.161Z","repository":{"id":57341022,"uuid":"103701838","full_name":"garrettmac/react-native-tweet","owner":"garrettmac","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-27T19:58:57.000Z","size":36804,"stargazers_count":8,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T01:23:18.953Z","etag":null,"topics":["react-native","react-native-component","react-native-module"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/garrettmac.png","metadata":{"files":{"readme":"README-dev.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":"2017-09-15T21:11:56.000Z","updated_at":"2019-01-11T08:01:13.000Z","dependencies_parsed_at":"2022-09-08T01:50:31.480Z","dependency_job_id":null,"html_url":"https://github.com/garrettmac/react-native-tweet","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/garrettmac%2Freact-native-tweet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrettmac%2Freact-native-tweet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrettmac%2Freact-native-tweet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrettmac%2Freact-native-tweet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garrettmac","download_url":"https://codeload.github.com/garrettmac/react-native-tweet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250014798,"owners_count":21361014,"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":["react-native","react-native-component","react-native-module"],"created_at":"2024-10-05T01:23:15.303Z","updated_at":"2025-04-21T07:33:00.207Z","avatar_url":"https://github.com/garrettmac.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg alt=\"react-native-tweet\" src=\"snapshots/react-native-tweet/react-native-tweet.jpg\" width=\"308\"\u003e\u003c/p\u003e\u003cp align=\"center\"\u003eMeet react-native-tweet\u003c/p\u003e\u003cp align=\"center\"\u003e\u003ca href=\"http://standardjs.com/\"\u003e\u003cimg  src=\"https://img.shields.io/badge/code style-standard-brightgreen.svg?style=flat-square\"\u003e\u003c/a\u003e\u003ca href=\"http://standardjs.com/\"\u003e\u003cimg  src=\"https://img.shields.io/github/downloads/atom/atom/latest/total.svg\"\u003e\u003c/a\u003e\u003ca href=\"https://npmjs.org/package/react-native-tweet\"\u003e\u003cimg alt=\"npm version\" src=\"http://img.shields.io/npm/v/react-native-tweet.svg?style=flat-square\"\u003e\u003c/a\u003e\u003ca href=\"https://npmjs.org/package/react-native-tweet\"\u003e\u003cimg alt=\"npm version\" src=\"http://img.shields.io/npm/dm/react-native-tweet.svg?style=flat-square\"\u003e\u003c/a\u003e\u003ca href=\"https://github.com/garrettmac/react-native-tweet/pulls?q=is:pr is:closed\"\u003e\u003cimg alt=\"PR Stats\" src=\"https://img.shields.io/issuestats/i/github/garrettmac/react-native-tweet.svg?style=flat-square\"\u003e\u003c/a\u003e\u003ca href=\"https://github.com/garrettmac/react-native-tweet/issues?q=is:issue is:closed\"\u003e\u003cimg alt=\"Issue Stats\" src=\"https://img.shields.io/issuestats/p/github/garrettmac/react-native-tweet.svg\" style=\"flat-square\"\u003e\u003c/a\u003e   \u003ca\u003e\u003cimg  src=\"https://img.shields.io/github/forks/garrettmac/react-native-tweet.svg\"/\u003e\u003c/a\u003e\u003ca\u003e\u003cimg  src=\"https://img.shields.io/github/stars/garrettmac/react-native-tweet.svg\"/\u003e\u003c/a\u003e\u003ca\u003e\u003cimg  src=\"https://img.shields.io/badge/license-MIT-blue.svg\"/\u003e\u003ca\u003e\u003cimg  src=\"https://img.shields.io/twitter/url/https/github.com/garrettmac/react-native-tweet.svg?style=social\"\u003e\u003c/a\u003e\u003ca href=\"https://gitter.im/garrettmac/react-native-tweet?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\"\u003e\u003cimg alt=\"Join the chat\" src=\"https://badges.gitter.im/garrettmac/react-native-tweet.svg\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n# React Native Tweet\n\n\nReact Native Tweet is the most up to date Twitter Module using **Twitter Kit 3**\n\n**NOTE:** THIS DOES NOT USE FABRIC!\n\nCurrently only ios, android coming soon\n\n## Getting Started\n\n## Installation\n\n- Install `react-native` first\n\n```bash\nnpm i react-native -g\nyarn add react-native-tweet\nmkdir Example\ncd Example\nyarn install #(or with npm)\nnpm start\n```\n\n\n### Example\n\nor clone the repo and play with the example project\n\n```bash\n$ git clone https://github.com/garrettmac/react-native-tweet\n# $ cd react-native-tweet/Example //not available yet\n$ yarn install\n$ react-native link react-native-tweet\n$ npm start\n```\n### Setup\n\n#### ios\n\n1. install the latest\n\nhttps://dev.twitter.com/twitterkit/ios/installation\n\n\n2. Drag All four to your project\n\u003e TwitterCore.framework\n\u003e TwitterKit.framework\n\u003e TwitterKitResources.bundle\n\u003e TwitterShareExtensionUIResources.bundle\n\n(Also see this repos screen shots for more details on setting up)\n\nhttps://apps.twitter.com\n\n3. add this to your `.plist`\n\n\u003e in your ios/EXAMPLE.plist\n\n```\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\u003carray\u003e\n  \u003cdict\u003e\n    \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n    \u003carray\u003e\n      \u003cstring\u003etwitterkit-\u003cconsumerKey\u003e\u003c/string\u003e\n    \u003c/array\u003e\n  \u003c/dict\u003e\n\u003c/array\u003e\n\u003ckey\u003eLSApplicationQueriesSchemes\u003c/key\u003e\n\u003carray\u003e\n    \u003cstring\u003etwitter\u003c/string\u003e\n    \u003cstring\u003etwitterauth\u003c/string\u003e\n\u003c/array\u003e\n\n```\n\n4. edit your AppDelegate\n\n\u003e in your ios/AppDelegate.m\n\n\n```\n#import \u003cTwitterKit/TwitterKit.h\u003e\n\n...\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n...\n   [[Twitter sharedInstance] startWithConsumerKey:@\"XXXXXXXXX\" consumerSecret:@\"XXXXXXXXX\"];\n...\n```\n\n### Basic Usage\n\n- In your `index.js`, use:\n\n```jsx\nimport RNTweet from \"react-native-tweet\"\n........\n```\n\n\n\n| Methods  | Params   | Description |\n|------------------|------------------|------------------|\n| `login` | N/A | Login User |\n| `logout` | N/A | Logout User |\n| `compose` | {setText,setURL,setVideo,setImage} | Compose Tweet  |\n| `user` | N/A | Get User  |\n| `retweet` | tweet `id` | Retweet  |\n| `api` | {endpoint,q}| Api User |\n\n\n\n\n\n\n\n\n\n\n## init()\n\n\n\n**Usage**\n\nYou only need to call it once and it can be added anywhere but it's better before your `AppRegister` function.\n\n```jsx\nRNTwitter.init({consumerSecret:\"\",consumerKey:\"\"})\n```\n\n## hideAlerts()\n\n\n\n**Usage**\n\nYou only need to call it once and it can be added anywhere but it's better before your `AppRegister` function.\n\n```jsx\nRNTwitter.hideAlerts()\n```\n\n\n## login()\n\n\n```jsx\nRNTwitter.login()\n.then(user=\u003econsole.log(user))\n.catch(console.warn)//optional\n\n```\n\n## compose()\n\n\n```jsx\nRNTwitter.compose({\nsetText:\"YOUR TEXT\"\nsetURL:\"YOUR URL\"\n// setVideo:\"YOUR VIDEO\" //coming soon\nsetImage:\"YOUR IMAGE\"\n})\n.then(console.log)\n.catch(console.warn)//optional\n\n```\n\n## logout()\n\n\n```jsx\nRNTwitter.logout()\n.then(console.log)\n.catch(console.warn)//optional\n\n```\n## user()\n\n\n```jsx\nRNTwitter.user()\n.then(console.log)\n.catch(console.warn)//optional\n\n```\n## retweet(tweetId)\n\n\n```jsx\nRNTwitter.retweet(tweetId)\n.then(console.log)\n.catch(console.warn)//optional\n```\n\n\n\n## api(options)\n\n\n\n\n```jsx\nRNTwitter.api({\n    endpoint: 'search/tweets.json',\n    q: encodeURI(`${q}`),\n    count\n  })\n.then(tweets=\u003e{\n  console.log(tweets)\n  })\n.catch(console.warn)//optional\n  ```\n\n  \u003e see https://dev.twitter.com/rest/public\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrettmac%2Freact-native-tweet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarrettmac%2Freact-native-tweet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrettmac%2Freact-native-tweet/lists"}