Page 1 of 2

Twitter and LiveCode (='.'=)

Posted: Mon Nov 28, 2016 9:31 am
by Mariasole
Hello everyone!
I must confess that I am very frustrated! :evil:

I'm trying for months to send LiveCode messages with image on Twitter, but I can not find any documentation useful for us beginners (but also medium prepared developer are on average much difficulty!).

Twitter's documentation is obscure and devoid of examples that could be useful for beginners.

I found this library (libTweet), very useful, allowing to send messages [http://codyssea.com/index.php/downloads/]. And it's the only one available!

I also wrote to the author, very kind, which also fixed a bug of the text encoding. But the library does not send messages with a photo.

I also tried to find examples with cUrl and then adapt them to LiveCode. But I found nothing!

What I would do is, with or without this library, send a plain text with a picture on Twitter with LiveCode!
Is there anyone who can help me and thousands of LiveCode users orphans of any standard library to communicate with social network?


Thank you all!
Mariasole
(='.'=)

Re: Twitter and LiveCode (='.'=)

Posted: Mon Nov 28, 2016 11:11 am
by shaosean
Did you check the Twitter API? https://dev.twitter.com/overview/api/entities This is the section that looks like it should contain your image.. Good luck :)

Re: Twitter and LiveCode (='.'=)

Posted: Mon Nov 28, 2016 11:49 am
by MaxV
First you have to upload the image, see this guide: https://dev.twitter.com/rest/reference/ ... pload.html
then you have to publish your tweet adding the image informations, like which of your uploaded images is for this for the tweet:

Code: Select all

"media":[{"type":"photo", "sizes":{"thumb":{"h":150, "resize":"crop", "w":150}, "large":{"h":238, "resize":"fit", "w":226},
"medium":{"h":238, "resize":"fit", "w":226}, "small":{"h":238, "resize":"fit", "w":226}}, "indices":[15,35],
"url":"http:\/\/t.co\/rJC5Pxsu", "media_url":"http:\/\/p.twimg.com\/AZVLmp-CIAAbkyy.jpg",
"display_url":"pic.twitter.com\/rJC5Pxsu","id":114080493040967680, "id_str":"114080493040967680", "expanded_url":
"http:\/\/twitter.com\/yunorno\/status\/114080493036773378\/photo\/1",
"media_url_https":"https:\/\/p.twimg.com\/AZVLmp-CIAAbkyy.jpg"}]

Re: Twitter and LiveCode (='.'=)

Posted: Mon Nov 28, 2016 12:11 pm
by Mariasole
Sorry MaxV,
I really thank you. But I do not understand. :oops:
I'm too stupid and complete beginner to understand your explanation.
I assure you that with me there are thousands of newcomers to the world of LC who would like to understand this function, but they can not write it!
Could you help me with an example of LC simpler?
Thank you very much!

Mariasole
(='.'=)

PS: I would simply make a tweet with the photo, like the one attached. They do it all in PHP, in Pyton, in Ruby, in FORTRAN (!?) with related examples, possible that in our wonderful LC do this is an epic problem? :evil:

Re: Twitter and LiveCode (='.'=)

Posted: Mon Nov 28, 2016 12:53 pm
by shaosean
Did you want me to write it for you or did you want help to find the information and then learn how to do it? Asking questions is okay, but basically saying "I don't understand show me how to do it" is not even showing that you attempted anything.. Saying "I've looked at their documentation and am stuck with {insert feature/concept here}. I can see how to do it in PHP {post sample code} how would something like that be done in LiveCode?" means you've at least looked at it, and people are more than willing to help out.. Again, if you just want me to write it for you, I will pass, but maybe someone else will provide you a quote for it and you can see if it works in to your budget.. Good luck :)

Re: Twitter and LiveCode (='.'=)

Posted: Mon Nov 28, 2016 3:07 pm
by Mariasole
shaosean wrote:Did you want me to write it for you or did you want help to find the information and then learn how to do it? Asking questions is okay, but basically saying "I don't understand show me how to do it" is not even showing that you attempted anything.. Saying "I've looked at their documentation and am stuck with {insert feature/concept here}. I can see how to do it in PHP {post sample code} how would something like that be done in LiveCode?" means you've at least looked at it, and people are more than willing to help out.. Again, if you just want me to write it for you, I will pass, but maybe someone else will provide you a quote for it and you can see if it works in to your budget.. Good luck :)
Hello shaosean,
thanks for your answer, you were very nice and kind.

Thanks for giving me described as a kind of vulture that steals time and know-how to others and, in the meantime, it is sitting eating chips in front of TV.

Before spitting judgments beg you to read what I write. I remind you that we are in the section of the forum "complete beginners". Usually beginners say: "I do not understand."

I'm not just trying (for months) to be able to send the tweet (also with the text with a picture) [http://forums.livecode.com/viewtopic.php?f=7&t=27401], but I provided the code of an application in that, modestly, I have found a bug that has been fixed by the kind author [http://forums.livecode.com/viewtopic.ph ... 00#p148939].

You know, in addition to programmers off the invoice, there are also beta testers.

I have therefore provided a open code [libTwitter] [http://forums.livecode.com/viewtopic.ph ... 37#p122137] that I can not expand (for posting image), because I am a novice.

If you have not had time to open the code and read it, you can not blame me.

However, I do not need the help of those who can not stand in an open source community. Because the first rule of a community is respect.

Forgive me shaosean because I'm learning, because I have no money, because I'm studying, because I can not pay you for a solution and why use LC community edition.

You know that with this version can not protect the code so everyone can benefit from it? It 's sad help for free to the community! It 's sad help allowing software development to go ahead, thanks to volunteer work and which do not always fall into the closed source Apple and multinational company.

I feel part of a community, as read in my signature, and in a community there are also people like me who is not good, that is not bright, they do not understand, who are back, and looking for help.

I'm trying to get this solution for a tweet with the image to give information for animals in need. If cat or dog or turtle can not see, I can not describe it, and their problems, in 140 characters.

Anyway, this simple application would be open, posted here, and useful to all (And thousands of users of LC community edition seek this solution). For this reason I do not do it for money, just to help and to learn. But maybe they are concepts unknown to you.

So please do not insult me ​​more. You made me cry, really, because I simply asked for a hand.

I'm a dreamer, not a cynical person, so I went up to LC, because even people like me, who will never have a career as a programmer, he could help others to build a better world with free coding.

To change this world where it says, without mincing words: "do not understand this hieroglyph code? Well go to checkout!".


However I will pray for you,
kind regards

Mariasole
(='.'=)

Re: Twitter and LiveCode (='.'=)

Posted: Mon Nov 28, 2016 4:07 pm
by dunbarx
Calm down everyone.

@Mariasole. I do not think Sean was being rude, but I do think he misread your post. You did, after all, say you had been working at this for a long time.

@ Sean. Right? Months?

@ Max. Your post does look daunting, eh?

I do not work in LC in any of the directions that are being discussed here. Does anyone have a simple example that they might share with Mariasole? Then we can let her expand on that; I do believe she is an energetic LC'er.

Craig Newman

Re: Twitter and LiveCode (='.'=)

Posted: Mon Nov 28, 2016 11:24 pm
by shaosean
I knew not of the other multiple threads on this same topic (maybe better to keep everything in one thread) and if they had been posted in the original message, I could have looked at them and probably would have been less catty =^.^=.. Even though there is the community version of LiveCode, I do not use it due to the fact they force a license on my code, as I prefer to put everything in to the public domain..

Re: Twitter and LiveCode (='.'=)

Posted: Tue Nov 29, 2016 3:23 pm
by Mariasole
dunbarx wrote: I do not work in LC in any of the directions that are being discussed here. Does anyone have a simple example that they might share with Mariasole? Then we can let her expand on that; I do believe she is an energetic LC'er.

Craig Newman
Thank you very Craig,
you're always very helpful and nice. :D

I know that if your research went in direction of Twitter you would help me (without asking for money in exchange :wink: ).
And helping me, you would have also helped others who use the GPL.

Thanks also for asking help for me!

It would also help if someone found the "plain vanilla" string cUrl to post on Twitter a text with a image.

I learned to control cUrl with LC, I could succeed with this solution ...

Thanks again

Mariasole
(='.'=)

Re: Twitter and LiveCode (='.'=)

Posted: Wed Nov 30, 2016 1:05 pm
by Mariasole
Hello friends of the forum!
For all those interested in posting a text with a photo on Twitter, I asked the forum of Twitter developers if anyone can help me find the right string cUrl.
In this way, perhaps, we could build (we the beginners) a small application to do this simple (but for me and for many almost impossible) task on Twitter with our loved LiveCode.
Thanks to all friends!

Mariasole
(='.'=)

Re: Twitter and LiveCode (='.'=)

Posted: Sun Dec 04, 2016 10:33 am
by Lagi Pittas
Hi Mariasole

im not sure if you have seen thus thread where ther is a twitter library for livecode
http://forums.livecode.com/viewtopic.php?f=11&t=22957

I didnt see anything there about a picture but it looks like thr OT knows what he is doing and could help

Regards Lagi

Re: Twitter and LiveCode (='.'=)

Posted: Mon Dec 05, 2016 8:43 am
by Mariasole
Hi Lagi!
Thank you for searching a solution for me! :D
You are always very nice and helpful, a real help for us beginners!
In fact the thread that you have reported to me is what I speak in my first thread.
The only library for sending Twitter messages available throughout the LiveCode universe is libTwitter by Jean-Marc "jihem" Quere. As I wrote before, I found a bug in the code of libTwitter and the author very kindly corrected it.
I also wrote to Jihem to implement its own library with an instruction to send the simple picture, but he always has very kindly declined.

Unfortunately I do not have the experience to write this code, since the Twitter documentation is very obscure (according to experts) and is referred to as examples in languages (Ruby, PHP, Python) of which I do not in the least know the syntax.
If there was not LiveCode and its simple and logical syntax, I do not ever write code, even passion, as I do.
That's why I asked for help to experts. And that's why I felt hurt by someone! :cry:

I'm trying for months and months to write the code alone, and sooner or later I'll make.
This solution, as you can see from other threads affects many people, if anyone can help me will also make others happy! :P
Thanks again Lagi!

Mariasole
(='.'=)

Re: Twitter and LiveCode (='.'=)

Posted: Mon Dec 05, 2016 10:52 am
by MaxV
Hi Mariasole,
the FM for livecode, at the preset free, has the new oAuth2 authentication library http://livecode.wikia.com/wiki/OAuth2
just copy the com.livecode.script-library.oauth2 folder somewhere and the use the extension manager to incorporate in your Livecode IDE
This would help you.

Re: Twitter and LiveCode (='.'=)

Posted: Mon Dec 05, 2016 11:58 am
by Lagi Pittas
HI Mariasole,

Sorry my mistake - I read your initial post but forgot you mentioned that library (dementia, old age, tiredeness - take your pick), and then found the thread- and thought of you :D .

I'm sure it will be solved - if they can do it in Python or Ruby ....

All the best Lagi

Re: Twitter and LiveCode (='.'=)

Posted: Tue Dec 06, 2016 5:36 pm
by Mariasole
Thanks MaxV!
I saw the link and I think I will serve as a base to connect to Twitter. Or better, it will need to understand better the connecting mechanism. You were very cute, I think this link will be useful to many more. :D
Thanks to you too Lagi!
I realized immediately that it was an oversight, and not depends on all the things you said ... but... you will maybe in love? :wink:

Thanks again guys, you are giving me courage!

Mariasole
(='.'=)