Set default twitter consumer_key and consumer_secret
This commit is contained in:
parent
5e9d48751c
commit
1330e37ad0
3 changed files with 22 additions and 13 deletions
|
@ -41,20 +41,29 @@ TwitterPlugin::TwitterPlugin(Config *config, Swift::SimpleEventLoop *loop, Stora
|
|||
this->config = config;
|
||||
this->storagebackend = storagebackend;
|
||||
|
||||
if(CONFIG_HAS_KEY(config, "twitter.consumer_key") == false ||
|
||||
CONFIG_HAS_KEY(config, "twitter.consumer_secret") == false) {
|
||||
LOG4CXX_ERROR(logger, "Couldn't find consumer key and/or secret. Please check config file.");
|
||||
exit(0);
|
||||
if (CONFIG_HAS_KEY(config, "twitter.consumer_key") == false) {
|
||||
consumerKey = "5mFePMiJi0KpeURONkelg";
|
||||
}
|
||||
|
||||
else {
|
||||
consumerKey = CONFIG_STRING(config, "twitter.consumer_key");
|
||||
}
|
||||
if (CONFIG_HAS_KEY(config, "twitter.consumer_secret") == false) {
|
||||
consumerSecret = "YFZCDJwRhbkccXEnaYr1waCQejTJcOY8F7l5Wim3FA";
|
||||
}
|
||||
else {
|
||||
consumerSecret = CONFIG_STRING(config, "twitter.consumer_secret");
|
||||
}
|
||||
|
||||
if (consumerSecret.empty() || consumerKey.empty()) {
|
||||
LOG4CXX_ERROR(logger, "Consumer key and Consumer secret can't be empty.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
adminLegacyName = "twitter.com";
|
||||
adminChatRoom = "#twitter";
|
||||
adminNickName = "twitter";
|
||||
adminAlias = "twitter";
|
||||
|
||||
consumerKey = CONFIG_STRING(config, "twitter.consumer_key");
|
||||
consumerSecret = CONFIG_STRING(config, "twitter.consumer_secret");
|
||||
|
||||
OAUTH_KEY = "twitter_oauth_token";
|
||||
OAUTH_SECRET = "twitter_oauth_secret";
|
||||
MODE = "mode";
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
macro(ADD_TEXTILE SRC TITLE)
|
||||
MESSAGE(STATUS "Process file: ${SRC}")
|
||||
STRING(REGEX REPLACE ".textile\$" "" outfileName "${SRC}")
|
||||
SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfileName}.html")
|
||||
# Custom command to do the processing
|
||||
message(STATUS "FILES" ${outfile})
|
||||
if(${ARGN})
|
||||
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
|
||||
COMMAND pandoc -o "${outfile}" "${SRC}" -f textile -t html -s --base-header-level=2 --template=template.html -T "${TITLE}"
|
||||
|
@ -21,6 +19,7 @@ endmacro()
|
|||
|
||||
ADD_TEXTILE("index.textile" "Spectrum 2 documentation" 1)
|
||||
ADD_TEXTILE("config_file.textile" "Spectrum 2 - Config File")
|
||||
ADD_TEXTILE("from_source_code.textile" "Spectrum 2 - Installing from source code")
|
||||
ADD_TEXTILE("server_ssl.textile" "Spectrum 2 - Server mode SSL support")
|
||||
ADD_TEXTILE("mysql.textile" "Spectrum 2 - MySQL Support")
|
||||
ADD_TEXTILE("postgresql.textile" "Spectrum 2 - PostgreSQL Support")
|
||||
|
@ -28,5 +27,5 @@ ADD_TEXTILE("logging.textile" "Spectrum 2 - Logging")
|
|||
|
||||
|
||||
# Setup a target to drive the conversion
|
||||
ADD_CUSTOM_TARGET(guide ALL DEPENDS ${outFiles})
|
||||
ADD_CUSTOM_TARGET(guide DEPENDS ${outFiles})
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
h2. About
|
||||
|
||||
h2. Installing
|
||||
h2. Installation
|
||||
* "From source code":from_source_code.html
|
||||
|
||||
h2. Configuring
|
||||
h2. Configuration
|
||||
|
||||
* "Configuration file description":config_file.html
|
||||
* "MySQL Support":mysql.html
|
||||
|
|
Loading…
Add table
Reference in a new issue