## Alternative configuration
-Add your key pair to your global config/addon.ini.php.
+Open the `config/local.config.php` file and add "twitter" to the list of activated addons:
- [twitter]
- consumerkey = your consumer_key here
- consumersecret = your consumer_secret here
+ 'system' => [
+ ...
+ 'addon' => '...,twitter'
+ ...
+ ]
+
+Add your key pair to your global `config/addon.config.php`.
+
+ 'twitter' => [
+ 'consumerkey' => 'your consumer_key here',
+ 'consumersecret' => 'your consumer_secret here',
+ ],
-To activate the addon itself add it to the [system] addon setting.
After this, users can configure their Twitter account settings from "Settings -> Addon Settings".
## License
--- /dev/null
+<?php
+
+// Warning: Don't change this file! It only holds the default config values for this addon.
+// Instead overwrite these config values in config/addon.config.php in your Friendica directory
+
+return [
+ 'twitter' => [
+ // consumerkey (String)
+ // OAuth Consumer Key provided by Twitter on registering an app at https://twitter.com/apps
+ 'consumerkey' => '',
+
+ // consumersecret (String)
+ // OAuth Consumer Secret provided by Twitter on registering an app at https://twitter.com/apps
+ 'consumersecret' => '',
+ ],
+];
+++ /dev/null
-<?php return <<<INI
-
-; Warning: Don't change this file! It only holds the default config values for this addon.
-; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
-
-[twitter]
-; consumerkey (String)
-; OAuth Consumer Key provided by Twitter on registering an app at https://twitter.com/apps
-consumerkey =
-
-; consumersecret (String)
-; OAuth Consumer Secret provided by Twitter on registering an app at https://twitter.com/apps
-consumersecret =
-
-INI;
-//Keep this line
\ No newline at end of file
* we do not need "Twitter as login". When you've registered the app you get the
* OAuth Consumer key and secret pair for your application/site.
*
- * Add this key pair to your global config/addon.ini.php or use the admin panel.
+ * Add this key pair to your global config/addon.config.php or use the admin panel.
*
- * [twitter]
- * consumerkey = your consumer_key here
- * consumersecret = your consumer_secret here
+ * 'twitter' => [
+ * 'consumerkey' => '',
+ * 'consumersecret' => '',
+ * ],
*
- * To activate the addon itself add it to the [system] addon
+ * To activate the addon itself add it to the system.addon
* setting. After this, your user can configure their Twitter account settings
* from "Settings -> Addon Settings".
*
function twitter_load_config(App $a)
{
- $a->loadConfigFile(__DIR__ . '/config/twitter.ini.php');
+ $a->loadConfigFile(__DIR__ . '/config/twitter.config.php');
}
function twitter_check_item_notification(App $a, array &$notification_data)