Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 761903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:53:38+00:00 2026-05-14T15:53:38+00:00

I would like to know where i can find my callback url in ci?

  • 0

I would like to know where i can find my callback url in ci? Im quite new to it so not really sure.

Here is the lib im using.

<?php

class Home extends Controller {

    function Home()
    {
        parent::Controller();   
    }

    public function index()
    {
        // This is how we do a basic auth:
        // $this->twitter->auth('user', 'password');

        // Fill in your twitter oauth client keys here

        $consumer_key = '';
        $consumer_key_secret = '';

        // For this example, we're going to get and save our access_token and access_token_secret
        // in session data, but you might want to use a database instead :)

        $this->load->library('session');

        $tokens['access_token'] = NULL;
        $tokens['access_token_secret'] = NULL;

        // GET THE ACCESS TOKENS

        $oauth_tokens = $this->session->userdata('twitter_oauth_tokens');

        if ( $oauth_tokens !== FALSE ) $tokens = $oauth_tokens;

        $this->load->library('twitter');

        $auth = $this->twitter->oauth($consumer_key, $consumer_key_secret, $tokens['access_token'], $tokens['access_token_secret']);

        if ( isset($auth['access_token']) && isset($auth['access_token_secret']) )
        {
            // SAVE THE ACCESS TOKENS

            $this->session->set_userdata('twitter_oauth_tokens', $auth);

            if ( isset($_GET['oauth_token']) )
            {
                $uri = $_SERVER['REQUEST_URI'];
                $parts = explode('?', $uri);

                // Now we redirect the user since we've saved their stuff!

                header('Location: '.$parts[0]);
                return;
            }
        }

        // This is where  you can call a method.

        $this->twitter->call('statuses/update', array('status' => 'Testing CI Twitter oAuth sexyness by @elliothaughin'));

        // Here's the calls you can make now.
        // Sexy!

        /*
        $this->twitter->call('statuses/friends_timeline');
        $this->twitter->search('search', array('q' => 'elliot'));
        $this->twitter->search('trends');
        $this->twitter->search('trends/current');
        $this->twitter->search('trends/daily');
        $this->twitter->search('trends/weekly');
        $this->twitter->call('statuses/public_timeline');
        $this->twitter->call('statuses/friends_timeline');
        $this->twitter->call('statuses/user_timeline');
        $this->twitter->call('statuses/show', array('id' => 1234));
        $this->twitter->call('direct_messages');
        $this->twitter->call('statuses/update', array('status' => 'If this tweet appears, oAuth is working!'));
        $this->twitter->call('statuses/destroy', array('id' => 1234));
        $this->twitter->call('users/show', array('id' => 'elliothaughin'));
        $this->twitter->call('statuses/friends', array('id' => 'elliothaughin'));
        $this->twitter->call('statuses/followers', array('id' => 'elliothaughin'));
        $this->twitter->call('direct_messages');
        $this->twitter->call('direct_messages/sent');
        $this->twitter->call('direct_messages/new', array('user' => 'jamierumbelow', 'text' => 'This is a library test. Ignore'));
        $this->twitter->call('direct_messages/destroy', array('id' => 123));
        $this->twitter->call('friendships/create', array('id' => 'elliothaughin'));
        $this->twitter->call('friendships/destroy', array('id' => 123));
        $this->twitter->call('friendships/exists', array('user_a' => 'elliothaughin', 'user_b' => 'jamierumbelow'));
        $this->twitter->call('account/verify_credentials');
        $this->twitter->call('account/rate_limit_status');
        $this->twitter->call('account/rate_limit_status');
        $this->twitter->call('account/update_delivery_device', array('device' => 'none'));
        $this->twitter->call('account/update_profile_colors', array('profile_text_color' => '666666'));
        $this->twitter->call('help/test');
        */
    }
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/home.php */

Thank you all

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:53:38+00:00Added an answer on May 14, 2026 at 3:53 pm

    Ok, I found the solution!

    The problem was in the .htaccess file I’m using (to remove the index.php from the url)

    I changed RewriteRule ^(.)$ /index.php?/$1 [L] to RewriteRule ^(.)$ /index.php/$1 [L] and now is working. I found that in a comment in this link: http://www.askaboutphp.com/58/codeigniter-mixing-segment-based-url-with-querystrings.html

    If someone needs more information, just let me know.

    Luis

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new here. I would like to know how can I display HTML
I would like to know where I can find the list of properties settable
I would like to know how I can find the length of an integer
I am new to R and I would like to know where I can
I would like to know where can I find the code which eclipse uses
I would like to know where can I find the back button image, the
i would like know some reference. I know i can googling it. but prefer
I would like to know how can i read a value of input text
I would like to know how can I use tinyint in SQL Server 2005
I would like to know how can I use jQuery to select multiple items

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.