I am working on Twitterbot backend application and I am trying to copy the direct messages in strings that can be saved and then read. If I want to successfully integrate that into my AIML (artifical intelligence markup language) engine.
As I run the file to test it, I get a Parse error:
syntax error, unexpected T_VARIABLE referring to the line "file_put_contents('Program-O/InfoBot2012/test.xml', $direct_messages);"
I checked the syntax and there is no apparent error since I followed this thread.
$connection = new TwitterOAuth($consumer_key,$consumer_secret, $oAuthToken, $oAuthSecret);
$direct_messages = $connection->get('direct_messages');
$direct_messages = file_get_contents('https://api.twitter.com/1/direct_messages.json')
file_put_contents('Program-O/InfoBot2012/test.xml', $direct_messages);
$direct_messages = simplexml_load_file("test.xml");