Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM followers function created #9

Closed
wants to merge 3 commits into from
Closed

DM followers function created #9

wants to merge 3 commits into from

Conversation

Crammers
Copy link

@Crammers Crammers commented Oct 5, 2019

Hi there,
Im pretty new to this (everyone wants those Hacktoberfest Tee's right?!), so please let me know if there's anything I've messed up.

Ive made a basic function for DM'ing followers with a random quote. However I had to test with the Twit as I has Issues with the Twitter one (error 32, couldn't auth). and looking at issues on the Twitter repo suggests others might have had the same issue. If you can see that I've clearly made an error then I can fix it. Else it might be that you would need to swap out Twitter for Twit if thats possible?

@vinitshahdeo vinitshahdeo self-requested a review October 5, 2019 16:33
/**
*
* @description Sends dms to all followers
*/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Crammers Did you check whether it's working or not?
Please set up your own Twitter Application, get API keys and test it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and No,
Yes the function works and I've sent DM's on my own account but testing with the Twitter packageI could not get past an authentication error. I could not even do a basic get or post (using one of the functions in your code and one of my own) so I'm not sure why.

Seems like there's no updates to the Twitter library for 2 years and a number of issues have been raised with similar problems.

The Twit package works the same as this Twitter one and I've no issue connecting or sending tweets/DM's.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please confirm?
If the npm module we're using outdated now, we can use another one i.e. Twit.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is. If you want let me test all the current code work the same with Twit and if so I'd recommend changing to it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please go ahead. Update the code and check all the flows.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only difference I can see between Twit and Twitter is the access_token_key is a slightly different name. In Twit its just access_token. I'll not be able to update this tonight but will do it first thing in the morning.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool:)
No problem. It's Hacktoberfest. We've time till the end of October. 😄

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive updated the PR, I was able to update the Twitter package to Twit without issue.
I haven't added the function to be called from any of the other function, twitter can be a bit strict with rate limiting so it would be easily exceeded if there were just a handful of followers. So I wasn't sure what would be the best method of implementation to avoid blocking?

@vinitshahdeo vinitshahdeo added enhancement New feature or request hacktoberfest Send PR and earn a free t-shirt good first issue Good for newcomers help wanted Extra attention is needed labels Oct 5, 2019
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Send PR and earn a free t-shirt help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants