Regarding tweeting onto a account each time a text is submitted


Hello, There is a requirement in my site where I add some text in a form which should be posted as tweet on my twiiter account. I have created an app for this in my account and has used its details in my Yii Twitter extension. In my controller I am not sure what to code, so that it doesn’t ask to login, as there is no requirement to login to tweet onto my own account everytime someone fill that form.

Please let me know if I need to give some more information.

if($activity_id == Yii::app()->params['haunting_story_id'] && $value="textarea")
	$twitter = Yii::app()->twitter->getTwitter();
	$request_token = $twitter->getRequestToken();
	Yii::app()->session['oauth_token'] = $token = $request_token['oauth_token'];
	Yii::app()->session['oauth_token_secret'] = $request_token['oauth_token_secret'];
	if($twitter->http_code == 200)
		$twitter = Yii::app()->twitter->getTwitterTokened($access_token['oauth_token'],$access_token['oauth_token_secret']);
		$tweet_status = $twitter->post('statuses/update', array('status' => $tweet));


Here am not getting how to get access token, or I need to pass something else in place of access token $acces_token variable in the method call getTwitterTokened()