Welcome Guest, Not a member yet? Register   Sign In
Integrating twitterOauth?
#6

If you are using composer, with default CI3 settings there will be created additional vendor directory in root location
(that's where you need to put composer.json file also). Calling new classes in your controller would be like:

PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

use 
Abraham\TwitterOAuth\TwitterOAuth;

class 
Welcome extends CI_Controller
{
    public function 
__construct()
    {
    
parent::__construct();
        
        
$connection = new TwitterOAuth(CONSUMER_KEYCONSUMER_SECRET$access_token$access_token_secret);
        
$content $connection->get("account/verify_credentials");
    }


To make this work you need to set option to true or custom path. More docs
 Link for composer.json file. Rest of docs for twitteroauth use.
Reply


Messages In This Thread
Integrating twitterOauth? - by blackbulldog - 04-04-2016, 08:42 AM
RE: Integrating twitterOauth? - by albertleao - 04-04-2016, 08:49 AM
RE: Integrating twitterOauth? - by blackbulldog - 04-04-2016, 09:29 AM
RE: Integrating twitterOauth? - by albertleao - 04-04-2016, 04:37 PM
RE: Integrating twitterOauth? - by blackbulldog - 04-05-2016, 01:22 AM
RE: Integrating twitterOauth? - by Tpojka - 04-05-2016, 04:43 AM
RE: Integrating twitterOauth? - by blackbulldog - 04-05-2016, 05:10 AM
RE: Integrating twitterOauth? - by raulrola - 01-12-2018, 07:30 AM
RE: Integrating twitterOauth? - by raulrola - 01-12-2018, 09:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB