joshmoody / codeigniter-twitterconsumer

Twitter API that works with Application-only authentication
7 stars 2 forks source link

Composer Conversion #4

Open joshmoody opened 11 years ago

joshmoody commented 11 years ago

Drop the CodeIgniter dependency and make this library work with Composer. This will mean breaking backwards compatibility because it uses the CI standards for loading configs.

PanMan commented 11 years ago

Hmm, I use this Because it is compatible with codeigniter...

joshmoody commented 11 years ago

@PanManAms It will still be compatible with CodeIgniter, it just won't have the hard dependency on CodeIgniter and can be used with any PHP framework. The biggest change would be instead of reading your config with $this->config->item();, configuration options will need to be passed in to the library.

Once bundled as a Composer library, it can be installed into projects written in CI, Laravel, Fuel, Symfony, etc with a single command.

http://net.tutsplus.com/tutorials/php/easy-package-management-with-composer/

PanMan commented 11 years ago

Ah, cool. As long as it stays compatible, it sounds like a great idea :)

GeeGirls4 commented 11 years ago

So I would have to download composer, test it then reapply it to codeigniter?

joshmoody commented 11 years ago

@deongee Yes, but if you aren't already using Composer, I strongly encourage you to look into it. It's the best thing to happen to PHP since PEAR. I'll most likely move the Composer/Packagist version to a new repo. I'll update this repo to be a CI wrapper library around the composer package and move the native CI implementation to a branch for legacy support.

GeeGirls4 commented 11 years ago

I'm getting a lot of heat from the customer and just got tasked this project. I'm not the original programmer for this dashboard which is developed with Codeigniter. Is it a way I can use it for Codeigniter without composer? I tried using composer 1st but its taking too much time that I should be spending on fixing CI.

Do you have any suggestions on how I can get this done soon?

joshmoody commented 11 years ago

The current version was made for CI. Installation is pretty straightforward. Download a zip and follow the instructions in the README. Make sure you install the required curl library mentioned in the README and register an app at https://dev.twitter.com/apps to create an app and get your consumer key and consumer secret.

xenioushk commented 11 years ago

Hello Josh, I tried to run example code from local server and it's showing me an error message. Here goes the message -

"{"success":false,"error":"Could not get bearer token. Error: 60: SSL certificate problem, verify that the CA cert is OK. Details:\nerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"}

I followed all your instructions according to your README file.

Please help me to solve this issue. Thank You.

PanMan commented 11 years ago

Is your servertime set correctly? This is often an issue with SSL errors.

xenioushk commented 11 years ago

How do I check server time that in local server? Please advice me.