Code Monkey home page Code Monkey logo

Comments (38)

huttarichard avatar huttarichard commented on June 11, 2024

https://github.com/huttarichard/instagram-private-api/blob/master/client/v1/thread.js#L232

Client.V1.Thread.configureText(session, userId, "text you would love to send").then((t) => console.log(t))

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

sorry did not read title

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

Client.Feed.Inbox how to work with feeds checkout readme...
this will provide you list of threads, every thread has .configureText or . configureMediaShare hastag etc ... for more checkout source

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Thanks! Do you mind if I keep this issue open, just in case I have any other problems to do with this?

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

sure

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

How far off am I? I have currently got the following code:
`
var feed = new Client.Feed.Inbox(session);

Promise.map(_.range(0, 20), function() {
    return feed.get();
})
.then(function(results) {
    // result should be Media[][]
    var media = _.flatten(results);
    var urls = _.map(media, function(medium) {
        return _.last(medium.configureText)
    });
    console.log(urls);
})`

However it justs returns an array of undefined

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

I realise all that will do is list the DMs I am still can't work out how to send one (to an existing group)

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

do you have an valid session?

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024
var feed = new Client.Feed.Inbox(session, 100);
feed.all().then(function(threads) {
    if (threads.length > 0)
        throw new Error("..... no messeges in inbox ....")
    return threads[0].configureText("text to someone")
})
.then(function(){
    console.log("text sended!")
})

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Sorry, I feel kinda stupid for asking all this questions, so thanks again for taking time to help me. From there how do I declare what group im sending it too, is there like group IDs or something

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

you need to iterate over inbox, find conversation you want to reply and then you broadcast.
threads coming from inbox is an array [Thread] of classes which is holding all info about thread, if you are looking for group conversation, you can inspect thread.params.title or what ever is in thread.params (you will find title property and others). Once you get right thread you can just use thread.broadcast<Text, Hashtag, Profile, Medium> and send what ever you want... Just take a look on source of thread class, it is not that complicated.

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

With your example:
Client.Session.create(device, storage, 'user', 'Passoword') .then(function(session) { var feed = new Client.Feed.Inbox(session, 100); feed.all().then(function(threads) { if (threads.length > 0) throw new Error("..... no messeges in inbox ...."); return threads[0].configureText("text to someone"); }) .then(function(){ console.log("text sent!") }); });

It throws the error, ......No messages in inbox...... Even though there is. However if I comment that out, it throws thread[0].configureText is not a function

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Crap I just put the password to tes the account in that, I have edited it now, but I realise the email notifying you about the post will have it in :/

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

@wizardsambolton you just got pwned :D

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

im going to investigate what is going on hold on

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Thanks!

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

@wizardsambolton I actually try this with your account, but got checkpoint since you we are using different ip. However with my account it is working... So, try npm update library should be at version 0.5.1, then try different account, must be sure there are some threads conversation in inbox. Also try Thread.approveAll().

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Ok will do.

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

and if nothing helps try to run git clone on repository ... run npm test and insert credentials when it ask you..

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Thanks!

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Well it did not work, so I am going to try doing what you said!

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Ok from that I got 1 failed test

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

put it here, but I just try it with your account and got all threads, first one s group conversation, of
mar.fmf,sophia_c_sprenkel,loulee.jones,helena_cookies,tbh.lozzer,hopefoxhope, feel free to tell me if I should delete it...

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

you are doing something wrong...

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Strange :/ I have no clue what im doing wrong though :/ (Also it would be nice for you to delete it, but not yet, as it may be useful to help xD)

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

no I mean, delete the names I mentioned...., your account is safe with me because you are going to change password as soon as you get what you working on ...

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

put the failiture you got from tests...

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Yeah, you dont need to delete the names its fine dw.

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Ok will do one sec

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024
Unhandled rejection AssertionError: expected '340282366841710300949128132075360282508' not to be '340282366841710300949128132075360282508' (false negative fail)
    at Assertion.fail (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/should/lib/assertion.js:92:17)
    at Assertion.Object.defineProperty.value (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/should/lib/assertion.js:174:17)
    at /Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/tests/cases/feeds/inbox.js:73:43
    at tryCatcher (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._resolveCallback (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:431:57)
    at Promise._settlePromiseFromHandler (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:522:17)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:580:21)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:580:21)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:580:21)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:580:21)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._resolveCallback (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:431:57)
    at Promise._settlePromiseFromHandler (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:522:17)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._resolveCallback (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:431:57)
    at Promise._settlePromiseFromHandler (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:522:17)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._resolveCallback (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:431:57)
    at Promise._settlePromiseFromHandler (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:522:17)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:636:18)
    at PromiseArray._resolve (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise_array.js:125:19)
    at PromiseArray._promiseFulfilled (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise_array.js:143:14)
    at Promise._settlePromise (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:572:26)
    at Promise._settlePromise0 (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/sambolton/Documents/Github1/InstagramPCDM/test/instagram-private-api/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

        1) should not be problem to get threads

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

Ok test is failing because you have only 4 conversations in inbox... which leads to failiture ... should be repaired, but it is not an bug in library...

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

run suite again but put console.log in it, you will find what is going on, how to respond to thread...

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

Sory feel like im being stupid, but put console.log where?

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

@huttarichard

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

tests directory, there is describe block with Inbox class specs so start over there...

from instagram-private-api.

UnbanTwin avatar UnbanTwin commented on June 11, 2024

I am so sorry to keep bothering you :/ however I added cnsole.log to the top of the describe block, however when I ran it I got tons of errors, so I removed it, and ran it again, and I am still getting the errors

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

I know that starting with programming can be hard, but if you do it by yourself, it is much easier then. Learn, inspect try more, this library is great source of learning. Good luck.

from instagram-private-api.

huttarichard avatar huttarichard commented on June 11, 2024

and google a lot man, for example you can start with promises and then continue to mocha

from instagram-private-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.