php facebook delete feeds

Posted by meAtStackOverflow on Stack Overflow See other posts from Stack Overflow or by meAtStackOverflow
Published on 2011-03-06T16:06:36Z Indexed on 2011/03/06 16:10 UTC
Read the original article Hit count: 162

Filed under:
|

Hi there,

I have manage to grab all the photos posted to my app wall. Now I am trying to add a function to my facebook app where it will delete all the feeds posted on the wall.

<?php

include_once 'facebook.php';
include_once 'config.php';

$feed = $facebook->api('/me/feed');
foreach($feed['data'] as $feeds)
{
        echo "Feeds secion", "<br />";
        echo $feeds["picture"], "<br />";
        echo "<img src='{$feeds['picture']}' />", "<br />";

        $target_path = "uploads/";
        $target_path = $target_path . basename($feeds["picture"]);

        $content = file_get_contents($feeds["picture"]);
        file_put_contents($target_path, $content);

}

?>

This is how i grab the photos and push them into my server. Please guide me on how i could delete all the feeds. I have went through some online examples but i could not figure out how to go about doing it. I kept receving errors.

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook