Posting images on Twitter

This forum contains topics that were moved from Get Satisfaction
Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Posting images on Twitter

Post 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

Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Posting images on Twitter

Post 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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Posting images on Twitter

Post 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

Post Reply