Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-twitter-api

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-twitter-api - npm Package Compare versions

Comparing version 1.6.5 to 1.7.0

2

package.json
{
"name": "node-twitter-api",
"version": "1.6.5",
"version": "1.7.0",
"description": "Simple module for using Twitter's API in node.js",

@@ -5,0 +5,0 @@ "keywords": ["twitter", "oauth", "rest", "streaming"],

@@ -54,3 +54,3 @@ # node-twitter #

```javascript
twitter.verifyCredentials(accessToken, accessTokenSecret, function(error, data, response) {
twitter.verifyCredentials(accessToken, accessTokenSecret, params, function(error, data, response) {
if (error) {

@@ -67,2 +67,3 @@ //something was wrong with either accessToken or accessTokenSecret

```
In the above example, `params` is an optional object containing extra parameters to be sent to the Twitter endpoint (see https://dev.twitter.com/rest/reference/get/account/verify_credentials)

@@ -69,0 +70,0 @@ ## Methods ##

@@ -10,4 +10,4 @@ var twitterAPI = require("./index.js");

});
/*
twitter.getRequestToken(function(error, requestToken, requestTokenSecret, results){

@@ -25,8 +25,8 @@ if (error) {

var requestToken = "Fy-IMgAAAAAAE9XOAAABUcX9rF4";
var requestTokenSecret = "UlC1qAQR1WuuvYGKccbnvN4lEP3XT2jo";
var requestToken = "_LdZ_AAAAAAAE9XOAAABUidBHZk";
var requestTokenSecret = "JLqVufAXe12M9UrFqHgmhwhCpvqH2HkG";
/*
twitter.getAccessToken(requestToken, requestTokenSecret, 5935085, function(error, accessToken, accessTokenSecret, results) {
twitter.getAccessToken(requestToken, requestTokenSecret, 7132519, function(error, accessToken, accessTokenSecret, results) {
if (error) {

@@ -48,2 +48,3 @@ console.log(error);

console.log(data["screen_name"]);
console.log(data["email"]);
console.log(response);

@@ -53,9 +54,24 @@ }

}
});
});*/
*/
var accessToken = "56701719-bknqBPcWZO6ILBFyUhDPYqbm4K8wEH0skosGowefH";
var accessTokenSecret = "NrPiEEmk9Wepi6Xvqpgb1PD9qiqU9GmpuDsKY4V7N101C";
twitter.verifyCredentials(accessToken, accessTokenSecret, {"skip_status": true}, function(error, data, response) {
if (error) {
//something was wrong with either accessToken or accessTokenSecret
//start over with Step 1
} else {
//accessToken and accessTokenSecret can now be used to make api-calls (not yet implemented)
//data contains the user-data described in the official Twitter-API-docs
//you could e.g. display his screen_name
console.log(data["screen_name"]);
console.log(data["status"]);
console.log(response);
}
});
/*

@@ -75,3 +91,3 @@ twitter.uploadMedia({

/*
twitter.statuses("oembed", {id: "507185938620219395"}, accessToken, accessTokenSecret, function(err, data, res) {

@@ -81,3 +97,3 @@ console.log(err);

//console.log(res);
});
});*/

@@ -84,0 +100,0 @@ function base64_encode(file) {

"use strict";
var VERSION = "1.6.5",
var VERSION = "1.7.0",
querystring = require("querystring"),

@@ -53,5 +53,7 @@ oauth = require("oauth"),

Twitter.prototype.verifyCredentials = function(accessToken, accessTokenSecret, callback, params) {
Twitter.prototype.verifyCredentials = function(accessToken, accessTokenSecret, params, callback) {
var url = baseUrl + "account/verify_credentials.json";
if(params) {
if (typeof params == "function") {
callback = params;
} else {
url += '?' + querystring.stringify(params);

@@ -58,0 +60,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc