CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 00:54:53 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=3a4b46b4e5a11ca5d0108f92e015e9a618e6bb78b6deecfaf6d3ef2e35102d14a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22fv2knVHF-ppoU96ZsvQ8YNR0_0QO5cr_%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d2a0e50b85f313-BLR
simpletweet.vala - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Rest;
- public class SimpleTweet {
- private static const string CONSUMER_KEY = "#######################"; // this comes from your app's twitter account page
- private static const string CONSUMER_SECRET = "########################################"; // this comes from your app's twitter account page
- private static const string URL_FORMAT = "https://api.twitter.com";
- private static const string REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token";
- private static const string FUNCTION_ACCESS_TOKEN = "oauth/access_token";
- private static const string FUNCTION_STATUSES_UPDATE = "1/statuses/update.xml";
- private static const string PARAM_STATUS = "status";
- public static int main(string[] args) {
- // make sure there is a message to tweet
- if(args[1] == null || args[1] == "") {
- stdout.printf("No tweet message specified.\n");
- return 0;
- }
- /** Authenticating with Twitter */
- // initialize proxy
- var proxy = new OAuthProxy(CONSUMER_KEY, CONSUMER_SECRET, URL_FORMAT, false);
- // request token
- try {
- proxy.request_token("oauth/request_token", "oob");
- } catch (Error e) {
- stderr.printf("Couldn't get request token: %s\n", e.message);
- return 1;
- }
- // prompt user for pin
- stdout.printf("Go to https://twitter.com/oauth/authorize?oauth_token=%s then enter the PIN\n", proxy.get_token());
- string pin = stdin.read_line();
- // access token
- try { proxy.access_token(FUNCTION_ACCESS_TOKEN, pin); }
- catch (Error e) {
- stderr.printf("Couldn't get access token: %s\n", e.message);
- return 1;
- }
- /** sending the tweet */
- // setup call
- ProxyCall call = proxy.new_call();
- call.set_function(FUNCTION_STATUSES_UPDATE);
- call.set_method("POST");
- call.add_param(PARAM_STATUS, args[1]);
- try { call.sync(); } catch (Error e) {
- stderr.printf("Cannot make call: %s\n", e.message);
- return 1;
- }
- // print success
- stdout.printf("Tweet succeeded!\n");
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
📌 Swapzone +37% glitch ⭐ 6
JavaScript | 1 sec ago | 0.25 KB
-
📝 MAKE $2500 IN 15 MIN ✅ Working
JavaScript | 4 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ C
JavaScript | 10 sec ago | 0.25 KB
-
💵 Make 3000$ in 20 minutes 💵
JavaScript | 13 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ 3
JavaScript | 17 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch
JavaScript | 22 sec ago | 0.24 KB
-
⭐⭐⭐Crypto Accounts⭐⭐
Java | 23 sec ago | 0.10 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ G
JavaScript | 26 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand