Hello Support
I have created an app where I wish send Twitter tweets. I have imported a Github plugin and I am able to post tweets. However I am not able to upload images to twitter. The code I am using is as follows
var m = Apperyio.storage.mediafiles.get();
var cb = new Codebird;
cb.setConsumerKey("YOURKEY", "YOURSECRET");
cb.setToken("YOURTOKEN", "YOURTOKENSECRET");
var params = {
"media": m,
};
cb.__call(
"media_upload",
params,
function (reply, rate, err) {
// you get a media id back:
console.log(reply.media_id_string);
Apperyio.storage.TwitterMediaId.set(reply.media_id_string);
Code: Select all
}
);
var mediaid = Apperyio.storage.TwitterMediaId.get();
cb.__call(
"statuses_update",
{
"media_ids": mediaid,
"status": "Whohoo, I just tweeted!"
},
function (reply, rate, err) {
// ...
}
);
The error message I am receiving is
{code: 38, message: "media parameter is missing."}
This tells me that params section is not being passed out to Twitter. What is the correct code that I can pass the params section out to Twitter?
Thanks in Advance