Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upList statuses request fails #426
Comments
This comment has been minimized.
This comment has been minimized.
IonBlueDesign
commented
Apr 19, 2018
|
In your T.get method call, where is next() defined, or is it available through a closure to the callback function? |
This comment has been minimized.
This comment has been minimized.
appskitchen
commented
Apr 20, 2018
|
@IonBlueDesign It sends request to next matching route(I'm using express). More - https://stackoverflow.com/a/10695714 |
This comment has been minimized.
This comment has been minimized.
JimTheMan
commented
Apr 24, 2018
|
I'm looking at the docs for Twitter api statuses/list, and it seems like that params object should work. Are you sure a list actually exists for the values on that object? And what does that even mean, "custom list"? |
This comment has been minimized.
This comment has been minimized.
appskitchen
commented
Apr 24, 2018
|
@JimTheMan I first sent a called to Twitter api lists/list to get the list ID that I've created and used that list ID for the above call. Did you able to get a results from lists/list? |
This comment has been minimized.
This comment has been minimized.
og24715
commented
May 1, 2018
|
I got the same error by using list_id. I use together slug and owner_screen_name both and it works. |
This comment has been minimized.
This comment has been minimized.
appskitchen
commented
May 2, 2018
|
@og24715 I used list_id, slug, owner_screen_name(as you might see my sample codes above) but it says page doesnt exist. Do I need to enable anything at twitter? My list is public too! |
This comment has been minimized.
This comment has been minimized.
appskitchen
commented
May 3, 2018
|
@og24715 Could you share sample codes that you used? Appreciate your help. |
This comment has been minimized.
This comment has been minimized.
og24715
commented
May 7, 2018
•
|
Hi @appskitchen Im sorry for the late reply because I was visiting my parents. const T = new Twit({
consumer_key: 'YOUR_CONSUMER_KEY',
consumer_secret: 'YOUR_CONSUMER_SECRET',
access_token: 'YOUR_ACCESS_TOKEN',
access_token_secret: 'YOUR_ACCESS_TOKEN_SECRET',
timeout_ms: 60 * 1000,
});
(async () => {
try {
const lists = await T.get('lists/list', { screen_name: 'og24715' });
for (list of lists.data) {
console.log(`\n****** list name: ${list.name}\n`);
const tweets = await T.get('lists/statuses', {
slug: list.slug,
owner_screen_name: list.user.screen_name,
count: 5,
});
for (tweet of tweets.data) {
console.log(`@${tweet.user.screen_name}\n ${tweet.text}`);
}
}
} catch (e) {
throw e;
}
})(); |
This comment has been minimized.
This comment has been minimized.
og24715
commented
May 7, 2018
|
Oops I guess that no need specify
https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference But, I know that an error as page does not exist will occur, by provide only |
This comment has been minimized.
This comment has been minimized.
appskitchen
commented
May 7, 2018
|
@og24715 Great catch. It does work with slug and owner_screen_name but not with list_id (for me atleast). Thanks Hirakawa |
appskitchen commentedApr 18, 2018
•
edited
Hi,
I'm trying to get statuses for a custom list that I created. I tried the following codes, but it throws me error -
The error I get
btw, Other call works(ex: home timeline). Appreciate your help.
Thanks