3 Replies - 166 Views - Last Post: 11 March 2014 - 10:04 AM Rate Topic: -----

#1 b1ackash  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 06-December 12

need help with the twitter API stuck

Posted 06 March 2014 - 11:44 PM

okay first of all to use the code you need cuRL and openssl they say. installed both
then download Abraham Williams twitterOauth. which i did. LINK ---> https://github.com/a...am/twitteroauth

here how i configured my openSSL -->www.phpjoel.com/2011/04/07/installing-ssl-using-openssl-on-a-wamp-localhost/ you might need to change some more things and add more modules to make it work
here's my code

you also need to create a twitter app to get the code for authetication
my output is blank
<?php include "twitteroauth-master/twitteroauth/twitteroauth.php";?>

<?php

$consumer="get from your twitter app";
$consumersecret="get from your twitter app";
$accesstoken= "get from your twitter app";
$accesstokensecret= "get from your twitter app";


$twitter =new TwitterOAuth($consumer,$consumersecret,$accesstoken,$accesstokensecret);
$tweets=$twitter->get('https://api.twitter.com/1.1/search/tweets.json?q=merhaba&result_type=recent&count=4 ');


print_r($tweets);

?>
<html>
   <head>
   
    </head>
	<body>
	  <form action="" method="post">
	     <label>Search :<input type="text" name="keyword" /></label>
	  
	  </form>
	</body>
	


</html>







Is This A Good Question/Topic? 0
  • +

Replies To: need help with the twitter API stuck

#2 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 322
  • View blog
  • Posts: 1,182
  • Joined: 15-January 14

Re: need help with the twitter API stuck

Posted 07 March 2014 - 09:48 AM

How are you checking for PHP errors? Have you configured PHP to use an error log?
Was This Post Helpful? 0
  • +
  • -

#3 b1ackash  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 06-December 12

Re: need help with the twitter API stuck

Posted 10 March 2014 - 11:08 PM

View PostArtificialSoldier, on 07 March 2014 - 09:48 AM, said:

How are you checking for PHP errors? Have you configured PHP to use an error log?


how do you do that
Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 322
  • View blog
  • Posts: 1,182
  • Joined: 15-January 14

Re: need help with the twitter API stuck

Posted 11 March 2014 - 10:04 AM

PHP has options called log_errors and error_log that you can either set inside php.ini, in a .htaccess file, or at runtime using ini_set. Here is a list of the relevant options:

http://www.php.net/m...nfiguration.php

I'd also suggest that you set the error reporting level to either E_ALL or E_ALL & ~E_STRICT. That page lists information about each of the configuration options.

If you're getting a blank page then I would suggest setting those options in php.ini or .htaccess instead of at runtime, because they might be syntax errors where the code would never run.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1