PRADHAN-P / php-twitter

Automatically exported from code.google.com/p/php-twitter
0 stars 0 forks source link

How would I write the output to a file twitter.xml? #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Not a problem. Apologies.

How could I write the XML to a file using this class?

With the old twitterPHP i did this.

$res = $t->friendsTimeline();
$fp = fopen("twitter.xml", "w");  
    fwrite($fp, $res);  
    fclose($fp); 
    echo "file has been created"; 
}

But with this new class, I get an error:

'Catchable fatal error: Object of class stdClass could not be converted to 
string in /mnt/stor2-
wc1-dfw1/374847/www.bigflannel.com/web/content/twitterNew.php on line 499'

I am trying to use this code:

$res = $t->friendsTimeline(); 
$fp = fopen("twitter.xml", "w");  
fwrite($fp, $res);  
fclose($fp); 
echo "file has been created"; 

Many many thanks if you can help.

Mike

Original issue reported on code.google.com by m.hart...@zoozoom.com on 24 Feb 2009 at 8:28

GoogleCodeExporter commented 9 years ago
Sorry, outside of scope.

Original comment by emmenset...@gmail.com on 28 Feb 2009 at 1:29