Last active
June 1, 2017 14:13
-
-
Save AyaMorisawa/4c8835e6bfe71d72790a86dd1117ba8f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { OAuth1Session } from 'requests_oauthlib'; | |
import json from 'json'; | |
let savedSession = json.load(open('./twitter.json', 'r')); | |
let sess = OAuth1Session( | |
savedSession.ck | |
savedSession.cs | |
savedSession.at | |
savedSession.cs | |
); | |
const baseUrl = 'https://api.twitter.com/1.1/'; | |
sess.post( | |
baseUrl + 'statuses/update.json', | |
{data: {statuses: 'Hello, World!'}} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment