Skip to content

Commit

Permalink
fix oauth script to include square brackets in end result
Browse files Browse the repository at this point in the history
  • Loading branch information
back-lacking committed Jul 28, 2024
1 parent f5406ab commit b02f220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twitter_oauth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ token_3=$(curl -s -XPOST "${base_url}" -H "att: ${att}" "${header[@]}" \
# finally print oauth_token and secret
curl -s -XPOST "${base_url}" -H "att: ${att}" "${header[@]}" \
-d '{"flow_token":"'"${token_3}"'","subtask_inputs":[{"check_logged_in_account":{"link":"AccountDuplicationCheck_false"},"subtask_id":"AccountDuplicationCheck"}]}' | \
jq -c '.subtasks[0]|if(.open_account) then {oauth_token: .open_account.oauth_token, oauth_token_secret: .open_account.oauth_token_secret} else empty end'
jq -c '.subtasks[0]|if(.open_account) then [{oauth_token: .open_account.oauth_token, oauth_token_secret: .open_account.oauth_token_secret}] else empty end'

0 comments on commit b02f220

Please sign in to comment.