Open tss123456 opened 6 years ago
i am getting following error
code:32 message:"Could not authenticate you."
when i write code for append details for upload video on twitter using codebird-js
following code are we use for upload video
function TwitterPosting(message, image, Credential, priority, priorityDate, OnSuccess, onError) { var convertFunction = convertFileToDataURLviaFileReader(image, function (base64) { var blob = dataURItoBlob(base64); var cb = new Codebird; cb.setConsumerKey(Credential[0].Key, Credential[0].Secret); cb.setToken(Credential[0].Access_x0020_Token, Credential[0].Access_x0020_Token_x0020_Secret); try {
//upload media base64 = base64.split(",")[1]; var params1 = { //"media_data": base64, "media_type": "video/mp4", "media_category": "amplify_video", "command": "INIT", "total_bytes": "456174", "Name": "Default" }; cb.__call( "media_upload", params1, function (reply, rate, err) { var params2 = { //"media_ids": reply.media_id_string, //"status": message, "Name": "Default", "command": "APPEND", "media_id": reply.media_id, "media": blob, "media_data": base64, "segment_index": 0, }; cb.__call( "media_upload", params2, function (reply, rate, err) { var params3 = { "Name": "Default", "command": "FINALIZE", "media_id": reply.media_id, }; cb.__call( "media_upload", params3, function (reply, rate, err) { var params4 = { "Name": "Default", "command": "STATUS", "media_id": reply.media_id, }; cb.__call( "media_upload", params4, function (reply, rate, err) { if (reply.id) { OnSuccess(); } else { onError(reply); } } ); } ); } ); } ); } catch (e) { console.log(e); } });
}
i am getting following error
code:32 message:"Could not authenticate you."
when i write code for append details for upload video on twitter using codebird-js
following code are we use for upload video
function TwitterPosting(message, image, Credential, priority, priorityDate, OnSuccess, onError) { var convertFunction = convertFileToDataURLviaFileReader(image, function (base64) { var blob = dataURItoBlob(base64); var cb = new Codebird; cb.setConsumerKey(Credential[0].Key, Credential[0].Secret); cb.setToken(Credential[0].Access_x0020_Token, Credential[0].Access_x0020_Token_x0020_Secret); try {
}