How to work with Twitter OAuth?

I pushed stuff from our website to our company twitter account automatically. Like some news updates, updates to some sections of our site, etc. All this happened automatically using the Zend Framekwork Twitter service or another very simple PHP code that uses hard-coded username / password.

Now Twitter has killed the old authentication. What is the right thing when you offer twitter integration for customers (who use OAuth for user-oriented stuff), but for internal things, isn't that a surplus?

Is there an easy way to update my code so that it works again? Can I somehow copy my own authentication key oauth so that I don’t have to create the whole login process with a database repository for a single-user application?

+2
source share
5 answers

If you already have your system installed to use oAuth, then yes, you can simply copy your key and secret key to the system, but otherwise you will have to upgrade to handle oAuth authentication.

, : http://blog.astrumfutura.com/archives/411-Writing-A-Simple-Twitter-Client-Using-the-PHP-Zend-Frameworks-OAuth-Library-Zend_Oauth.html

Edit:

, , , oAuth, :

$consumer_key = 'xxxxxxxxxxxxxxx';
$consumer_key_secret = 'xxxxxxxxxxxxxxx';
$access_token = 'xxxxxxxxx';
$access_token_secret = 'xxxxxxxx';

$auth = $this->twitter->oauth($consumer_key, $consumer_key_secret, $access_token, $access_token_secret);
0

Zend Framework.

1.10.8 Framework Twitter, , .

Zend Framework 1.10.8 Release

0

Shameless plugin - I made a simple blog article about using Oauth with Zend_Service_Twitter. Like another poster, you should first check your version of ZF, though.

0
source
0
source

All Articles