hello,

I am getting this error:

 Catchable fatal error: Argument 2 passed to
Zend_Oauth_Token_Access::toQueryString() must 
implement interface Zend_Oauth_Config_Interface, instance of
Zend_Oauth_Client given, called in 
/htdocs/twitter/library/Zend/Oauth/Client.php on line 131 and defined in 
/htdocs/twitter/library/Zend/Oauth/Token/Access.php on line 55


I am trying to make Zend_Oauth work with my existing Twitter_Model.

/**
 * I'm trying to extend Zend_Service_Twitter to use Oauth instead
 */

require_once 'Zend/Service/Twitter.php';

class Mytwitterapp_Twitteroauth extends Zend_Service_Twitter
{
        /**
         * Oauth
         * @var Zend_Oauth_Token_Access
         */
        protected $_token;
        
        /**
         * Config Array for Zend_Oauth_Consumer (i think)
         * @var Zend_Config_Ini
         */
        protected $_config;
        
        /**
         * @param object Zend_Oauth_Token_Access $token
         * @return void
         */
        public function __construct(Zend_Oauth_Token_Access $token)
        {
                $this->_config = new Zend_Config_Ini(APPLICATION_INI, 
APPLICATION_ENV);
                $this->_token = $token;

        $this->setUri('http://twitter.com');

           
self::setHttpClient($token->getHttpClient($this->_config->oauth->toArray()));
        }
        
        public function _init()
        {
                parent::_init();
        }
//...more code...
}


I am now able to get a valid token from Twitter.com, but I could not debug
the error above. Would be glad to hear any of your replies. If this is a
bug/issue with Zend_Oauth, I will file an issue in the issue tracker.

-----
http://blog.ekini.net
-- 
View this message in context: 
http://www.nabble.com/Zend_Oauth-%2B-Zend_Service_Twitter%3A-Zend_Oauth_Token_Access%3A%3AtoQueryString%28%29-error-tp25093258p25093258.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to