Monday, November 2, 2015

Integrating Abraham's Twitter OAuth library into Magento 1.9 lib folder

Recently, in an attempt to include excellent TwitterOAuth library to my Magento 1.9 lib folder, I have found a problem with array_map function in Util.php file (in TwitterOAuth\Util). The namespace used with that call must be modified to match the one used by Magento (usually empty).

Otherwise, error 32 is generated - "Couldn't authenticate".

Besides this little problem, library classes must be renamed to comply to Magento's autoloading rules (i.e. class Config should become Twitteroauh_Config, while being installed to lib/Twitteroauth/Config.php).

No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...