$twitteroauth = new TwitterOAuth(YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET, 'User_Token Access', 'user_token secret');
$twitteroauth->post('statuses/update', array('status' => 'Hello Nettuts+'));
When I try to use this code, I am getting error
Could no开发者_运维技巧t authenticate you
And my Status was also not updated. Why is it so?
Regarding your comment:
I have a web app, where users' activity will be tweeted. The above tutorial works only for my twitter account
Of course you can only post tweets to your own account. Imagine what could happen if you can tweet ‘random’ messages to every account. I would not like that.
To tweet using others' accounts, you'll need their authentication keys.
精彩评论