Skip to content

Commit 3c83afd

Browse files
authored
Update 27-twitter.html
Added bearer token to support API V2.0
1 parent 6aea983 commit 3c83afd

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

social/twitter/27-twitter.html

+11-5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
<label style="margin-left: 20px;" for="node-config-input-access_token_secret"><span data-i18n="twitter.label.access_secret"></span></label>
3030
<input type="password" id="node-config-input-access_token_secret">
3131
</div>
32+
<div class="form-row">
33+
<label style="margin-left: 20px;" for="node-config-input-access_token_bearer"><span data-i18n="twitter.label.access_bearer"></span></label>
34+
<input type="password" id="node-config-input-access_token_bearer">
35+
</div>
3236
</script>
3337

3438
<script type="text/javascript">
@@ -45,8 +49,9 @@
4549
consumer_key: { type: "password"},
4650
consumer_secret: { type: "password" },
4751
access_token: {type: "password"},
48-
access_token_secret: {type:"password"}
49-
},
52+
access_token_secret: {type:"password"},
53+
access_token_bearer: {type:"password"}
54+
},
5055
label: function() {
5156
if (this.screen_name) {
5257
return (this.screen_name[0]!=="@"?"@":"")+this.screen_name
@@ -60,7 +65,8 @@
6065
"consumer_key",
6166
"consumer_secret",
6267
"access_token",
63-
"access_token_secret"
68+
"access_token_secret",
69+
"access_token_bearer",
6470
];
6571
// Just in case any whitespace has crept in with the copy-paste of the fields
6672
trimFields.forEach(function(field) {
@@ -102,7 +108,7 @@
102108
<script type="text/javascript">
103109
RED.nodes.registerType('twitter in',{
104110
category: 'social-input',
105-
color:"#C0DEED",
111+
color:"#3FADB5",
106112
defaults: {
107113
twitter: {type:"twitter-credentials",required:true},
108114
tags: {value:""},
@@ -181,7 +187,7 @@
181187
<script type="text/javascript">
182188
RED.nodes.registerType('twitter out',{
183189
category: 'social-output',
184-
color:"#C0DEED",
190+
color:"#3FADB5",
185191
defaults: {
186192
twitter: {type:"twitter-credentials",required:true},
187193
name: {value:"Tweet"}

0 commit comments

Comments
 (0)