• Shom

    Hey thank you for this amazing work. But can you help me with instagram api config? Which callback_url and which redirect_uri I should use? I saw in your demo you used /os_instagram_autolike/endpoint. But this one doesnt work for me.

  • Kevin Si

    Hi iFew,

    First of all thank you so much for this great development. I’m currently having an error in which I could not solve. I was already able to connect to instagram but then this shows:
    Fatal error: Call to undefined function base_url() in /application/modules/os_instagram_autolike/controllers/os_instagram_autolike.php on line 104

    Can you please help?

  • freshfitteds

    You have to load the url helper to access that function.



    into the application/config/autoload.php to be loaded automatically everywhere.

    • iFew

      @freshfitteds:disqus Thank you 😀 , it’s very easy

  • Maksim A

    Hey iFew, thanks for posting it.

    I am totally confused with redirect URL, what do i put there?

    my link looks like:
    I put it to the redirect URL and get this:

    {“code”: 400, “error_type”: “OAuthException”, “error_message”: “Redirect URI does not match registered redirect URI”}

    Also, I noticed in your example you directly access os_instagram_autolike without index.php.

    I am totally new to it and trying to learn

  • Jip van Kuijk

    Its sad that I get this message:

    FAIL -> We’ve taken extra measures to protect the Instagram API from abnormal activity. Since you have recently created your API application, please contact apidevelopers@instagram.com to receive whitelisting for a higher rate limit.

  • rey

    would it be possible to have it run automatically 24/7?

    • you can setup cron job for automatically

  • Barni


    First of all I want to say thanks for this great project! Very nice! 🙂

    I found a “bug” (or something like that).
    There is a little security problem: when a user logging in the system storing the datas in cookie and the user can use the instagram token everywhere he wants.
    Suggestion: use sessions (CodeIgniter ofc. can do it) and that is completely safe.

    (sorry for bad english 🙂 )

    • Thank you Barni, it’s great if you using session.

      but i’m using cookie with raw data for demonstration and easy to tracking 😀

  • flavinhof

    Hi My Friend,
    I almost done put the script in mode on. I would you help if possible.

    Like another friend said about a FATAL ERROR
    Fatal error: Call to undefined function base_url() in /public_html/ci/application/modules/os_instagram_autolike/controllers/os_instagram_autolike.php on line 104

    I try copy your configuration, Creating a new folder called /endpoint at
    “/application/modules/os_instagram_autolike/endpoint” and use it as CallBack Url

    Api Instagram:
    – Website URL
    – Redirect URI http://mysite.com/ci/index.php/os_instagram_autolike/endpoint

    I think my problem is happening because the url “index.php” appear in the middel to access.


    • Hi, check your config in /application/config/autoload.php
      and check your helper config to enable “url”

      $autoload[‘helper’] = array(‘url’);

  • ömer oğuzhan

    I do not know english very well . but I have a question . I did download and upload files to the site. I enter the api and when I press the connect to instagram part of the page is opened. against coming to the same page again after the permit application. I ask you all to share the script . Thank you..

    • yeah it’s return to old page but text display difference. you should to display debug text to show error message