telegram-api
telegram-api copied to clipboard
Incomplete Source Code?
Hi, First THANK YOU so much for your excellent Telegram.
When I'm browsing through the source code, I notice that some files are missing, like:
org.telegram.api.auth.TLAuthorization etc.
What has been released is just org.telegram.api.engine, but all the rest under org.telegram.api.* are missing? Or am I missing something?
I have the same question
I have the the same problem. It seems that there are some classes provided only as byte code in:
https://github.com/ex3ndr/telegram-api/tree/master/libs
It is a problem because the classes in binary form provide incomplete information with respect to the API. Thus, you have limited functionality. For example, I have been able to send and receive text messages with the API but not to download profile photos.
When i build the mtproto individually it runs fine but when i try building the telegram-api folder it gives me a :"could not fine any version that matches com.droidkit:actors:0.2.48+" required by ....>telegram-api:mtproto:unspecified
@mfeliu can you please share your code. I am trying to send a message using telegram API and stuck with the "TimeOu Exceptiont".
@jnitish25 the code I wrote was just a small modification of this project
https://github.com/ex3ndr/telegram-bot
Be careful though to download the exact versions (the exact commits) of the libraries linked under the /libraries path of this project.
Good luck!
Ya even i tried the same but Im getting a so called "unknown dispatcher connection error" and when i use d default ootion it gets timedout at RPC call.. Thank u for ur reply.. On Sep 30, 2014 4:33 PM, "mfeliu" [email protected] wrote:
@jnitish25 https://github.com/jnitish25 the code I wrote was just a small modification of this project
https://github.com/ex3ndr/telegram-bot
Be careful though to download the exact versions (the exact commits) of the libraries linked under the /libraries path of this project.
Good luck!
— Reply to this email directly or view it on GitHub https://github.com/ex3ndr/telegram-api/issues/25#issuecomment-57297352.
Hey, Please can you help me out with this Telegram issue.I'm really stuck with it for the past 2 weeks.I downloaded the exact versions as well. Thank you. Regards, Nitish
On Tue, Sep 30, 2014 at 4:33 PM, mfeliu [email protected] wrote:
@jnitish25 https://github.com/jnitish25 the code I wrote was just a small modification of this project
https://github.com/ex3ndr/telegram-bot
Be careful though to download the exact versions (the exact commits) of the libraries linked under the /libraries path of this project.
Good luck!
— Reply to this email directly or view it on GitHub https://github.com/ex3ndr/telegram-api/issues/25#issuecomment-57297352.
Some one plz share samples for sending text messages using this API. I couldn't get any documentations for sending messages
@mfeliu ,Can u share some samples on sending text messages using this API. i have authenticated the application,but no clues to move forward.I suppose most of the samples over internet were removed .
you need first add recipient to sender's contact list. Then you can create peer with contact and send there a message
I already have a few in my contact list..but i don't have method details on adding new/retrieving existing user/chat id...can u share some samples!!
val contact = new TLInputContact(1, "087643264", "Alex", "K")
val contacts = new TLVector[TLInputContact]
contacts.add(contact)
val importContacts = new TLRequestContactsImportContacts(contacts, true)
val importedContacts = api.doRpcCall(importContacts)
val recipient = importedContacts.getUsers.get(0)
val peer = new TLInputPeerContact(recipient.getId)
val sendMessageRequest = new TLRequestMessagesSendMessage(peer, sendMessage.messageText, Random.nextLong())
val sentMessage = api.doRpcCall(sendMessageRequest)
There is sample code in Scala. Hope you can read it :)
Hi Alex,
thanks for the code.It gives me better idea.
Replicated the same in Java..but I m getting timed out exception while RPC for importContacts..Am I missing something??
TLInputContact tlic=new TLInputContact(1, PhNo, Fname, Lname);
TLVector<TLInputContact> contacts = new TLVector<>();
contacts.add(tlic);
TLRequestContactsImportContacts importContacts = new
TLRequestContactsImportContacts(contacts, true); * TLImportedContacts importedContacts = api.doRpcCall(importContacts);* TLAbsUser recipient=importedContacts.getUsers().get(0); TLInputPeerContact peer = new TLInputPeerContact(recipient.getId()); TLRequestMessagesSendMessage sendMessageRequest = new TLRequestMessagesSendMessage(peer, "Test", rnd.nextInt()); TLAbsSentMessage sentMessage = api.doRpcCall(sendMessageRequest);
On Mon, Dec 1, 2014 at 8:38 PM, Alex Kvak [email protected] wrote:
val contact = new TLInputContact(1, "087643264", "Alex", "K") val contacts = new TLVector[TLInputContact] contacts.add(contact) val importContacts = new TLRequestContactsImportContacts(contacts, true)val importedContacts = api.doRpcCall(importContacts) val recipient = importedContacts.getUsers.get(0)val peer = new TLInputPeerContact(recipient.getId) val sendMessageRequest = new TLRequestMessagesSendMessage(peer, sendMessage.messageText, Random.nextLong()) val sentMessage = api.doRpcCall(sendMessageRequest)
There is sample code in Scala. Hope you can read it :)
— Reply to this email directly or view it on GitHub https://github.com/ex3ndr/telegram-api/issues/25#issuecomment-65077404.