Page 1 of 1

Posting images on Twitter

Posted: Wed Apr 25, 2018 8:09 pm
by Mark7294305

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


Posting images on Twitter

Posted: Thu Apr 26, 2018 5:59 pm
by Mark7294305

Hello Support
Please can someone look this!! Its a simple coding issue which you should be able to resolve quickly. FYI the GitHub is https://github.com/jublonet/codebird-js


Posting images on Twitter

Posted: Thu Apr 26, 2018 7:01 pm
by Evgene Karachevtsev

Hello Mark,

Unfortunately, custom code and plugins are outside the scope of standard Appery.io platform support. You may consider purchasing Advisory Pack to get more in-depth help on this question. Here is more information about it: http://appery.io/services/#Advisory_Pack