Migrate to twitter oauth2.0 [fixes the previous merge conflict] #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the issue #45
Detailed overview of the changes being made:-
publisher/twitter/oauth2/
--> The files inside this are handling all the oauth2 flow related stuffs.Like authorizing app, authenticating requests, regenerating tokens, etc. Using the package, golang.org/x/oauth2.
publisher/twitter/publisher.go
--> Removed dependency of dghubble/oauth1, dghubble/twitter package and added our own inbuilt oauth2 handler for twitter.Also, changed the working of the function to monitor tweets for exceeding length(to help in testing).
publisher/twitter/publisher_test.go
--> Commented two test functions for now. As, they are using empty/invalid id and secret for generating config that will result into failed authentication. Have to think for other work around.PublishersAndProviders.md
--> Added steps to generate twitter client id and secret.README.md
--> Added the information for authorization steps that the user needs to perform while running the bot.img/
--> New folder, it contains images to help visualize the above steps for better understanding and assistance.cmd/larry/main.go
--> Changes to integrate with the updated authorization flow.publisher/twitter/oauth2/test_files
--> This folder contains file required while testing oauth2 package.docker-compose.yml
--> Removed the variables which are not required anymore.cc: @ezeoleaf