如何在发布后返回Facebook事件ID,以便我可以添加封面照片?

I am using the following code (found on SO) to post Events on behalf of my Facebook page.

require_once 'fb-sdk/facebook.php';

$facebook = new Facebook(array(
    'appId' => 'APPID',
    'secret' => 'SECRET'
));

$facebook->setAccessToken('TOKEN');

try {
    $retObj = $facebook->api('/PAGE_ID/events/create', 'POST', array(
        "name" => 'Test Event 1234',
        "description" => 'This is a test!!',
        "start_time" => '2013-03-19'
    ));

} catch(FacebookApiException $e) {
    echo $e->getMessage();
}

This works fine and dandy to create the event, but then afterwards I want to come back and add a Cover Photo to the event using the following code (again, found on SO):

$cover['cover_url']     = 'MYIMAGE.jpg';
$eventUpdate = $facebook->api( "/" . $fbEvent['id'], 'post', $cover );

This code requires an event ID that is generated when the event is posted.. so my question is:
how do I return the Event ID after posting an event, so it can be used to update my Event Cover Photo?

Or better yet, is there a streamlined way of creating the event, and adding the Cover Photo all in one go?

you just want to get event id you created ?

add this code at the end of your first code $id=$retObj['id']; OR $id=$retObj[0]['id']; not sure which one but i think first one should work

you can find helpful information by adding this code at the end of first code echo '<pre>'; print_r($retObj); echo '</pre>';