Git Product home page Git Product logo

Comments (7)

Windos avatar Windos commented on August 24, 2024

Actually, scratch that comment about it being capped at 2048... been playing around and looks like it actually between 64,512 and 65,536 (I was testing in increments of 1024 and really didn't feel like getting more specific than that!)

from pstwitterapi.

mkellerman avatar mkellerman commented on August 24, 2024

Look at how I got the DirectMessages to work with a JSON body:

https://github.com/mkellerman/PSTwitterAPI/blob/master/PSTwitterAPI/public/Send-TwitterDirectMessages_EventsNew.ps1

Care to try your own implementation, and see if that fixes the file size limitation?

from pstwitterapi.

Windos avatar Windos commented on August 24, 2024

I stumbled upon that and have been playing around, unfortunately still no luck.

Initially I created a new private function ConvertTo-EscapedDataString which escapes the data in chunks, but then of course it finally gets to Invoke-RestMethod and it complains about the length of the final URI.

Then went down the JSON path, and the response back is:

Invoke-RestMethod : {"errors":[{"code":38,"message":"banner parameter is missing."}]}

The documentation for this endpoint and the DM one is subtly different and almost looks like this one won't take JSON.

I've started investigating (after some JS people mentioned it) using 'ContentType' = 'multipart/form-data'... but this is heading in to uncharted territory for me lol.

I'll keep playing.

from pstwitterapi.

Windos avatar Windos commented on August 24, 2024

Ok... don't think multipart is being accepted. Followed @markekraus example from when support for it was being added to PowerShell core.

Still getting parameter missing response.

from pstwitterapi.

mkellerman avatar mkellerman commented on August 24, 2024

@Windos have you tried with the latest version?

from pstwitterapi.

Windos avatar Windos commented on August 24, 2024

from pstwitterapi.

mkellerman avatar mkellerman commented on August 24, 2024

I haven't played with sending images.. :/

from pstwitterapi.

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.