Download the PHP package magium/mcm-twitter without Composer
On this page you can find all versions of the php package magium/mcm-twitter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download magium/mcm-twitter
More information about magium/mcm-twitter
Files in magium/mcm-twitter
Package mcm-twitter
Short Description This is a simple library that manages the configuration for the abraham/twitteroauth library using the Magium Configuration Manager
License Apache-2.0
Informations about the package mcm-twitter
Magium Configuration Manager Adapter for abraham/twitteroauth
This library provides an interface for the abraham/twitteroauth so you can use it with the Magium Configuration Manager. Often applications will have some kind of static configuration mechanism, such as XML files, JSON files, YAML files, or PHP files. There's nothing necessarily wrong with that, but what it does is merge your deployment and configuration concerns. The Magium Configuration Manager (MCM) breaks that dependency so you can manage configuration separately from your deployment.
This library uses the MCM to provide a configured abraham/twitteroauth instance.
Getting Started
Configuring the MCM
Initialization
If you have not done so already, initialize the MCM.
Then configure the magium-configuration.xml file. It will look something like this:
Then, make sure that the remote configuration table is created
Setting the Configuration
First list the configuration keys. These are the configuration endpoints that he library understands.
Then create a custom Twitter application at https://dev.twitter.com/. You will need the consumer key and consumer secret at a minimum. If you intend to interact with your account and not use it for authentication you can generate your access token and token secret from the application page.
Now you need to configure the MCM. (magium-configuration
is in vendor/bin/ or vendor/magium/configuration-manager/bin
)
Then you need to build the configuration to compile it and push it to the storage location.
Usage
Using the MCM requires the use of the Magium Configuration Manager Factory which will receive the correct configuration object which you then pass to the Twitter Factory. That's a lot of words to explain this:
If you want to post an update: