Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Okay, I placed a bounty on this question and I do not know how to remove it. I am going to answer it myself. For others to know if they are encountering the same problem.</p> <p>First, in my application.ini I have something like this:</p> <pre><code>oauth.version = "1.0" oauth.signatureMethod = "HMAC-SHA1" oauth.requestScheme = "header" oauth.siteUrl = "http://mysite.com/twitter/public" oauth.callbackUrl = "http://mysite.com/twitter/public/login/callback" oauth.requestTokenUrl = "http://twitter.com/oauth/request_token" oauth.authorizeUrl = "http://twitter.com/oauth/authorize" oauth.accessTokenUrl = "http://twitter.com/oauth/access_token" oauth.consumerKey = "xxxxxx" oauth.consumerSecret = "xxxxxxxxxx" </code></pre> <p>Then, my new model is this:</p> <pre><code>&lt;?php /** * 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; /** * Array for Zend_Oauth_Consumer (i think) * @var Zend_Config_Ini */ protected $_config; /** * @param object $token * @return void */ public function __construct(Zend_Oauth_Token_Access $token) { $this-&gt;_config = new Zend_Config_Ini(APPLICATION_INI, APPLICATION_ENV); $this-&gt;_token = $token; $this-&gt;setUri('http://twitter.com'); //$this-&gt;_authInitialized = true; self::setHttpClient($token-&gt;getHttpClient($this-&gt;_config-&gt;oauth-&gt;toArray())); } } </code></pre> <p>Using it would look something like this:</p> <pre><code>$oauth = new Zend_Session_Namespace('Twitter_Oauth'); $token = unserialize($oauth-&gt;twitter_access_token); $this-&gt;_twitter = new Mytwitterapp_Twitteroauth($token); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload