launch_cross_post

Launch a user's uploaded video to a social networking site.

Explorer

Explore this method

Request URL

http://api.tubemogul.com/api/v3/

HTTP method

GET or POST

Arguments

NOTE: Unless otherwise denoted, strings are limited to 256 UTF-8 encoded characters.


upload_id (integer) - Required
The ID of the uploaded video. This value is returned by list_uploads and upload_video.
site_id (integer) - Required
The ID of the social networking site to launch coss-post to. The available values are returned by list_available_cross_post_sites.
profile_id (integer) - Required
The ID of the upload profile to be used for credentials.

Example Response

Note that the response status here indicates only the success or failure of sending the launch command. To see the actual status of the launch to the video site, call the getVideoStatus method.

<?xml version="1.0" encoding="utf-8" ?>
<response stat="ok">
  <status>Success</status>
</response>

Error Codes

Standard error codes plus:

10 : One or more required fields are empty
40 : Invalid site for crosspost (invalid site_id, no credentials, site not enabled, or cross-post already launched).
50 : Uploadid is invalid or does not belong to the user

Example Code

<?
# Your user token
$user_token '';

# Your partner ID
$partner_id '';

# Your secret key
$secret_key '';

# Required uploadid
$upload_id '';

# Required profile id
$profile_id '';

$method 'launchCrossPost';

$now time();

$apihost 'http://api-upload.tubemogul.com/index.php';


#
# valid values come from listAvailableSites
#
$site_id '';

$poststring "date=".$now.
              
"&userToken=".urlencode($user_token).
              
"&partnerID=".urlencode($partner_id).
              
"&upload_id=".$upload_id.
              
"&site_id=".$site_id.
              
"&profile_id=".$profile_id.
              
"&method=".$method;

$hash sha1($secret_key.$poststring);

$poststring .= "&hash=".$hash;

echo 
$poststring;
?>

<br /><br />
<form action='<? echo $apihost?>' method='post'>
<input type='hidden' name='date' value='<? echo $now?>' />
<input type='hidden' name='userToken' value='<? echo $user_token?>' />
<input type='hidden' name='partnerID' value='<? echo $partner_id?>' />
<input type='hidden' name='upload_id' value='<? echo $upload_id?>' />
<input type='hidden' name='site_id' value='<? echo $site_id?>' />
<input type='hidden' name='profile_id' value='<? echo $profile_id?>' />
<input type='hidden' name='method' value='<? echo $method?>' />
<input type='hidden' name='hash' value='<? echo $hash?>' />
<input type='submit' value='submit!' />
</form>