Can I change the profile picture or a timeline cover automatically using the Facebook API?
Now I'm using a link with makeprofile=1; like parameter but this needs a user confirmation.
$photo = $facebook->api($album_id . '/photos', 'post', $args);
if($photo['id'] != "")
{
$pictue = $facebook->api('/'.$photo['id']);
$fb_image_link = $pictue['link']."&makeprofile=1";
echo '<a href="'.$fb_image_link.'" target="_blank"> Poner como perfil </a>';
}
Simple answer is NO.
It's not possible to change profile picture or cover image and I think it's restricted mainly because if the apps are allowed to do these things, then spammers would mess up user's profile by uploading their scammy images as timeline covers and already these guys do a lot of things with current features allowed through Graph API.
You can however upload an image to a new album or existing album, give user instructions on how to set the new uploaded image as their timeline cover.
Also i think you should first try searching your question before posting it as this question has been asked many times before by other people and have already been answered.
Hope it clears your doubt.