ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

CodeIgniter 2.0 Google URL Shortener API Library

February 17, 2011 9:13am

Subscribe [3]
  • #1 / Feb 17, 2011 9:13am

    appleboy

    38 posts

    Github: https://github.com/appleboy/CodeIgniter-Google-URL-Shortener-API

    CodeIgniter Google URL Shortener API Library

    Welcome to the home of the Google URL Shortener API Library, a project that will help you to shorten, expand, analytics long URL.

    What is the Google URL Shortener API?

    The Google URL Shortener at goo.gl is a service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share, tweet, or email to friends. The Google URL Shortener API allows you to develop applications that interface with this service. You can use simple HTTP methods to create, inspect, and manage goo.gl short URLs from your desktop, mobile, or web application.

    ref : http://code.google.com/intl/zh-TW/apis/urlshortener/

    Spark Install

    Please referrer from http://getsparks.org/packages/google-url-shortener/versions/HEAD/show

    INSTALLATION

    Download all file from github.

    $ git clone git://github.com/appleboy/CodeIgniter-Google-URL-Shortener-API.git

    Move the files to their corresponding places within your codeigniter application directory.

    $ copy config/google_url_api.php your_application/config/
    $ copy controller/google_url.php your_application/controller/
    $ copy libraries/Google_url_api.php your_application/libraries/

    Open config/google_url_api.php file, and configure your shorten api key

    $config['google_api_key'] = "xxxxx";

    If you’re having problems, then enable debugging in your controller code:

    $this->google_url_api->enable_debug(TRUE);

     
    COPYRIGHT AND LICENCE

    Copyright (C) 2011 Bo-Yi Wu
    My Blog: http://blog.wu-boy.com/2011/02/17/2542

  • #2 / May 14, 2011 6:56pm

    Gurik

    11 posts

    nice lib but doesn’t work with me :(

    Severity: Notice

    Message: Trying to get property of non-object

    Filename: controllers/google_url.php

    Line Number: 24

  • #3 / May 15, 2011 3:57am

    appleboy

    38 posts

    hi Gurik:

    What is your environment?

    I use CodeIgniter 2.0.2 and run googl api source code on FreeBSD system, it is ok.

    Do you run on Windows with Appserv( http://www.appservnetwork.com/ )

  • #4 / May 15, 2011 6:18pm

    Gurik

    11 posts

    Hi again appleboy
    i’v tested on local windows first with my custom apache install (enabled curl)

    now I’ve uploaded to linux webserver here http://stumari.com/index.php/google_url
    i suppose the problem is with the api connection (Response code: 403)
    but i’v checked in api console and the key is right + requests have been registered on api console

  • #5 / May 15, 2011 11:39pm

    appleboy

    38 posts

    hi Gurik:

    Could you provide your OS version and php extension library list?

    I suppose the problem that your php don’t support curl with “https”.

  • #6 / May 15, 2011 11:41pm

    haydenhancock

    15 posts

    Github: https://github.com/appleboy/CodeIgniter-Google-URL-Shortener-API

    CodeIgniter Google URL Shortener API Library

    Welcome to the home of the Google URL Shortener API Library, a project that will help you to shorten, expand, analytics long URL.

    What is the Google URL Shortener API?

    The Google URL Shortener at goo.gl is a service that takes long URLs and squeezes them into fewer characters to make a link that is easier to share, tweet, or email to friends. The Google URL Shortener API allows you to develop applications that interface with this service. You can use simple HTTP methods to create, inspect, and manage goo.gl short URLs from your desktop, mobile, or web application.

    ref : http://code.google.com/intl/zh-TW/apis/urlshortener/


    INSTALLATION

    Download all file from github.

    $ git clone git://github.com/appleboy/CodeIgniter-Google-URL-Shortener-API.git

    Move the files to their corresponding places within your codeigniter application directory.

    $ copy config/google_url_api.php your_application/config/
    $ copy controller/google_url.php your_application/controller/
    $ copy libraries/Google_url_api.php your_application/libraries/

    Open config/google_url_api.php file, and configure your shorten api key

    $config['google_api_key'] = "xxxxx";

    If you’re having problems, then enable debugging in your controller code:

    $this->google_url_api->enable_debug(TRUE);

     
    COPYRIGHT AND LICENCE

    Copyright (C) 2011 Bo-Yi Wu
    My Blog: http://blog.wu-boy.com/2011/02/17/2542

    Cool library! Thanks!

  • #7 / May 16, 2011 12:12am

    appleboy

    38 posts

    Hi again appleboy
    i’v tested on local windows first with my custom apache install (enabled curl)

    now I’ve uploaded to linux webserver here http://stumari.com/index.php/google_url
    i suppose the problem is with the api connection (Response code: 403)
    but i’v checked in api console and the key is right + requests have been registered on api console

    hi Gurik:

    I fixed this problem, please check out CodeIgniter-Google-URL-Shortener-API source code again.

    Thanks.

  • #8 / Oct 25, 2011 9:01am

    appleboy

    38 posts

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases