Home > TwitterApiComponent

TwitterApiComponent

TwitterApiComponent is a project mainly written in PHP, it's free.

cakePHPでTwitterを扱うためのコンポーネント

1.OAuth consumer componentを入手する http://code.42dh.com/oauth/ からOAuth consumer componentを入手する

解凍後、OAuthディレクトリを「app/vendors」へいれる oauth_consumersフォルダと、oauth_consumer.phpを「app/controllers/conponents」にいれる

2.Consumerクラスの作成 「app/controllers/components/oauth_consumers」にtwitter_consumer.phpを作成する 中身は以下の通り

class TwitterConsumer extends AbstractConsumer { function construct() { parent::construct('YOUR_CONSUMER_KEY', 'YOUR_CONSUMER_SECRET'); } }

あとはtwitter_api.phpを「app/controllers/conponents」にいれていただければ準備完了です。

Previous:App-perlzonji