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
| var Twit = require('twit') | |
| var twitter = new Twit({ | |
| consumer_key: '', | |
| consumer_secret: '', | |
| access_token: '', | |
| access_token_secret: '' | |
| }); | |
| var filePath = 'path/to/video/file' |
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 os | |
| import sys | |
| from TwitterAPI import TwitterAPI | |
| consumer_key = '' | |
| consumer_secret = '' | |
| access_token = '' | |
| access_token_secret = '' | |
| twitter = TwitterAPI(consumer_key, consumer_secret, access_token, access_token_secret) |
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 requests | |
| import json | |
| from requests_oauthlib import OAuth1 | |
| API_URL = 'https://data-api.twitter.com/insights/engagement' | |
| CONSUMER_KEY = 'YOUR_CONSUMER_KEY' | |
| CONSUMER_SECRET = 'YOUR_CONSUMER_SECRET' | |
| ACCESS_TOKEN = 'USER_ACCESS_TOKEN' | |
| ACCESS_TOKEN_SECRET = 'USER_ACCESS_TOKEN_SECRET' |
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 os | |
| import sys | |
| import time | |
| import json | |
| import requests | |
| from requests_oauthlib import OAuth1 | |
| MEDIA_ENDPOINT_URL = 'https://upload.twitter.com/1.1/media/upload.json' |
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
| var request = require('request'); | |
| var fs = require('fs'); | |
| var MEDIA_ENDPOINT_URL = 'https://upload.twitter.com/1.1/media/upload.json' | |
| var POST_TWEET_URL = 'https://api.twitter.com/1.1/statuses/update.json' | |
| var OAUTH = { | |
| consumer_key: '', | |
| consumer_secret: '', |
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
| var nconf = require('nconf') | |
| var request = require('request') | |
| // load config | |
| nconf.file({ file: 'config.json' }).env() | |
| // twitter authentication | |
| var twitter_oauth = { | |
| consumer_key: nconf.get('TWITTER_CONSUMER_KEY'), |
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 base64 | |
| import hmac | |
| import hashlib | |
| import json | |
| # Example app consumer secret found in apps.twitter.com | |
| APP_CONSUMER_SECRET = 'z3ZX4v7mAAUGykl3EcmkqbartmuW8VFOOzCloLx9Q45P0hLrFu' | |
| # Example token provided by incoming GET request | |
| TOKEN = '9b4507b3-9040-4669-9ca3-6b94edb50553' |
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
| crypto = require('crypto'); | |
| // Example app consumer secret found in apps.twitter.com | |
| APP_CONSUMER_SECRET = 'z3ZX4v7mAAUGykl3EcmkqbartmuW8VFOOzCloLx9Q45P0hLrFu'; | |
| // Example token provided by incoming GET request | |
| TOKEN = '9b4507b3-9040-4669-9ca3-6b94edb50553'; | |
| /** |
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 base64 | |
| import hmac | |
| import hashlib | |
| import json | |
| # Example app consumer secret found in apps.twitter.com | |
| APP_CONSUMER_SECRET = 'z3ZX4v7mAAUGykl3EcmkqbartmuW8VFOOzCloLx9Q45P0hLrFu' | |
| # Example token provided by incoming GET request | |
| TOKEN = '9b4507b3-9040-4669-9ca3-6b94edb50553' |
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
| var request = require('request') | |
| // twitter authentication | |
| var twitter_oauth = { | |
| consumer_key: 'TWITTER_CONSUMER_KEY', | |
| consumer_secret: 'TWITTER_CONSUMER_SECRET', | |
| token: 'TWITTER_ACCESS_TOKEN', | |
| token_secret: 'TWITTER_ACCESS_TOKEN_SECRET' | |
| } |
OlderNewer