PHP/Codeigniter- How can I search tweets with hashtag using by REST api and twitterapiexchange library? -


i trying use rest apı search tweets hashtags. also, using library twitterapiexchange. there problem when wanted write keyword searchbox.

here controller customer.php

...     public function search(){       if($this->session->userdata('logged_in')){          error_reporting(0);          $session_data = $this->session->userdata('logged_in');          $data1['email'] = $session_data['email'];          $this->load->view('navbarview', $data1);     $settings= array( 'consumer_key' => 'd76iqflcqrxijvjgqvjr1q', 'consumer_secret'=> 'pspjkrxrsr74gzmljsx5fevqijhlgerk8nmt3gw8by', 'oauth_access_token'=> '616244226-g0fqhmvkn5utpmzvslcncjnbcg4hpsezxjdmxeax', // optional 'oauth_access_token_secret'=> 'rsihbvzihfjrsi5drtypddhgkhpoao0zbpojca6tzcvm5');  $this->load->library('twitterapiexchange' );  if(isset($_post[('searchbox')])){     $url = 'https://api.twitter.com/1.1/search/tweets.json';      $getfield = '?q='.$_post['searchbox'].'&result_type=mixed&count=10';     $requestmethod = 'get';      $twitter = new twitterapiexchange();     $tweet= $twitter->setgetfield($getfield)              ->buildoauth($url, $requestmethod)              ->performrequest();      $tweets= json_decode($tweet);   }      }  else {          redirect('home', 'refresh');      }     }... 

here view:

  ...            <form class="navbar-search pull-left" action="http://localhost/crm/customers/search" method="post">                           <input type="text" id="searchbox" name="searchbox" class="search-query span2" placeholder="ara">                         </form>     ... 

what's point of problem? pls help!


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -