Stream tweets into Salesforce via Platform Events
NOTE: This project requires a Twitter app.
- Type
git clone git@github.com:swaraj/salesforce-stream.git - Type
cd twitter-salesforce-stream - Type
npm install
You will need the following environment variables:
- TWITTER_CONSUMER_KEY -- Twitter app key
- TWITTER_CONSUMER_SECRET -- Twitter app secret
- TWITTER_ACCESS_TOKEN -- Twitter client token
- TWITTER_ACCESS_TOKEN_SECRET -- Twitter client secret
- TWITTER_SEARCH_STRING -- Search keywords, comma separated
- SALESFORCE_CLIENT_ID -- Salesforce Connected App ID
- SALESFORCE_CLIENT_SECRET -- Salesforce Connected App secret
- SALESFORCE_USERNAME -- Your Salesforce username
- SALESFORCE_PASSWORD -- Your Salesforce password
- SALESFORCE_SECURITY_TOKEN -- Your Salesforce security token
- NODE_ENV -- Use
productionfor production, orsandboxfor scratch orgs
If you're deploying with Heroku, just throw these variables into an .env file in the project base directory and use heroku local to launch the app.
Here's a template to copy/paste (or you can rename .exampleenv in this project to .env):
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=
TWITTER_SEARCH_STRING=
SALESFORCE_CLIENT_ID=
SALESFORCE_CLIENT_SECRET=
SALESFORCE_USERNAME=
SALESFORCE_PASSWORD=
SALESFORCE_SECURITY_TOKEN=
NODE_ENV=
- Type
npm start