I am trying to create a web application that allows a user to post tweets from a form directly on a web page, instead of using their own built-in Twitter popup. The problem is that the code snippet that I am browsing over the network does not work:
$message = "Hello there! This is a tweet!";
$twitterObj->post('statuses/update', array('status' => "$message"));
And when I try to execute the code, I get this error:
Warning: invalid argument provided by foreach () in /twitter/EpiOAuth.php on line 76
Warning: http_build_query () [function.http-build-query]: Parameter 1 must be an array or an object. Invalid value specified in /twitter/EpiOAuth.php on line 140
I am building an example and using the OAuth library found at this web address:
http://www.jaisenmathai.com/articles/twitter-php-sign-in.html
Does anyone have any tips?
EDIT! , , :
$twitterObj->post_statusesUpdate(array('status' => 'Message goes here.'));