1

Non-static method YahooSession::requireSession() should not be called statically

I am using yahoo / yos-social-php for login to my site i tried simple code but it resulted following error

Strict Standards: Non-static method YahooSession::requireSession() should not be called statically in /nas/www/inwiter/lib/yahoo/login.php on line 13

**My code is **

<?php  
  require("lib/Yahoo.inc");  

  // Your Consumer Key (API Key) goes here.  
  define('CONSUMER_KEY', "********");  

  // Your Consumer Secret goes here.  
  define('CONSUMER_SECRET', "*****");  

  // Your application ID goes here.  
  define('APPID', "*****");  

  $session = YahooSession::requireSession(CONSUMER_KEY,CONSUMER_SECRET,APPID);
  print_r($session);  
?>  

Can any one suggest me where i am wrong.

by
5 Replies
  • I'm having the some problem when using php for winodws But no problem when running under linux ...

    0
  • windows: PHP Version 5.4.10; linux: PHP Version 5.3.10

    0
  • in linux : @ php.ini : error_reporting = E_ALL & ~E_DEPRECATED ................... in windows : @ php.ini : error_reporting = E_ALL | E_STRICT

    ... So I changed it to be as in linux and it works ! [change php.ini and restart apache]

    0
  • http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

    0
  • same problem at linux server

    0

Recent Posts

in General Discussion at YDN