Comments (5)
@lukaswhite I've just been doing a couple of tests, and it turns out that you can pass screen_name
and user_id
in the same API call. Do you mind if I go ahead and build this out with the ability for using both params in one request?
from node-twitter.
By all means; the "fix" above isn't doing anything right now, not got as far as a pull request or anything - just waiting on some sort of response.
Out of interest, why would you pass both the screen name and user_id, if they refer to the same user?
from node-twitter.
Flexibility, I guess. I was thinking of a particularly bizarre use case where a user provided something like ['102718482', 'twitterapi']. We can split that into screen_name=twitterapi&user_id=102718482 based on data type, and the response you get returns the user details for both the usernames provided in screen_name, and the id's provided in user_id. The response back from Twitter's API with the above data looks like this (when testing via cURL, anyway):
[ { "name":"Jamie Hoyle", "screen_name":"mightyshakerjnr", "id":102718482, "id_str":"102718482", "connections":[ "none" ] }, { "name":"Twitter API", "screen_name":"twitterapi", "id":6253282, "id_str":"6253282", "connections":[ "none" ] } ]
from node-twitter.
@hyl @lukaswhite I just pushed a new version which introduces a new callback pattern and better support for endpoints that have not been added. If you pull down twitter@1 you can use:
var params = {};
client.get('friendships/lookup', params, function(error, data){
});
Eventually we will deprecate this helper functions as they will become impossible to scale.
from node-twitter.
@lukaswhite @hyl I will leave this open to keep the id vs screen_name discussion going
from node-twitter.
Related Issues (20)
- Less of an issue... more of a question! HOT 1
- Use on Discord
- posting images from directory HOT 1
- How upload two images? HOT 1
- Media entities always return images not video or gifs (Thumbnail image) HOT 1
- Update Character Count to 280 for Tweets Returned in Response to Search
- Support json payload body
- "client.stream" gets old tweets. HOT 1
- Dependencies "request": "^2.72.0" Is has been deprecated
- Error: HTTP Error: 401 Unauthorized
- Favorite count always Zero
- Loading an image from a url
- How to like a tweet? HOT 1
- url_1.URL is not a constructor on get.('tweets') request HOT 1
- Error: Invalid URI "undefined/statuses/update.json"
- users/search query params
- Track specific users tweets Twitter-Discord-Bot
- Question: Does this support Oauth2 with PKCE flow?
- Stream API get Error: Status Code: 403 HOT 1
- Twitter announced recently new API paid version, can you tell us how we migrate from here HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-twitter.