When creating the key files I used echo to create the key files.
echo SOME_TWITTER_TOKEN_GOES_HERE > keys/token
Apparently doing so added a carriage return to the end of the file so when the file was read into the proper variable the carriage return ended up being part of the variables value. This was causing authentication problem when trying to authenticate with Twitter.
Anyways the additional lines trim the string then remove any carriage returns which may be present in the value. Please note these lines will only be needed temporarily until the point a configuration file storing such values has been added to the project.
When creating the key files I used echo to create the key files.
echo SOME_TWITTER_TOKEN_GOES_HERE > keys/token
Apparently doing so added a carriage return to the end of the file so when the file was read into the proper variable the carriage return ended up being part of the variables value. This was causing authentication problem when trying to authenticate with Twitter.
Anyways the additional lines trim the string then remove any carriage returns which may be present in the value. Please note these lines will only be needed temporarily until the point a configuration file storing such values has been added to the project.