bit.ly v3 API Library |
[eluser]patrickpopowicz[/eluser]
A simple library for accessing the V3 of the bit.ly API using CodeIgniter and cURL. The code is attached and also up with documentation on Github, at http://bit.ly/aUWz2Y. Feedback welcome and appreciated, Patrick
[eluser]ImmergeTech[/eluser]
I've put bitly.php into application/config I've put Bitly.php into application/libraries I put my API key and username into the bitly.php config file. In my controller I put: Code: $this->load->library('bitly'); In my view I put: Code: <?php echo($shorturl) ?> and all I get is blank output. Nothing below the php statement is output. I'm on a windows server if that matters.
[eluser]CIfan[/eluser]
[quote author="ImmergeTech" date="1271114462"]I've put bitly.php into application/config I've put Bitly.php into application/libraries I put my API key and username into the bitly.php config file. In my controller I put: Code: $this->load->library('bitly'); In my view I put: Code: <?php echo($shorturl) ?> and all I get is blank output. Nothing below the php statement is output. I'm on a windows server if that matters.[/quote] Is CURL activated on your server?
[eluser]ImmergeTech[/eluser]
After seeing your post I enabled the PHP curl extension and restarted Apache2. Still have the same problem. Curl is working on my server, I used this to test it: Code: <?php and it outputs a bunch of stuff.
[eluser]CIfan[/eluser]
[quote author="ImmergeTech" date="1271117456"]After seeing your post I enabled the PHP curl extension and restarted Apache2. Still have the same problem. Curl is working on my server, I used this to test it: Code: <?php and it outputs a bunch of stuff.[/quote] What happens if you do this? Code: if ($result = $this->bitly->shorten('http://www.example.com'))
[eluser]patrickpopowicz[/eluser]
The library has been converted to a spark, you can get it over at http://getsparks.org/packages/codeigniter-bitly/show. |
Welcome Guest, Not a member yet? Register Sign In |