PSTwitterAPI icon indicating copy to clipboard operation
PSTwitterAPI copied to clipboard

How do I upload a jpg and tweet that?

Open jimmyeao opened this issue 4 years ago • 4 comments

$file = "D:\OneDrive\Desktop\images\New_folder\Abedour.jpg"
$length = (get-item $file).Length
Send-TwitterMedia_Upload -command INIT -total_bytes $length -media_type image/jpeg 

this returns the media.id, but I cant see the syntax for Send-TwitterStatuses_UpdateWithMedia to actually upload and post?

jimmyeao avatar Apr 14 '21 12:04 jimmyeao

Hi Jimmy, thanks for your comment.

Unfortunately, I didn't test all the functions. I created a wrapper that generates the functions automatically based on the API documentation. It's not great but it works most of the time.

If you find the solution to your issue, please let me know! I'll update the code.

mkellerman avatar Apr 15 '21 05:04 mkellerman

Hi, I've spent 3 solid days trying to figure it out, my coding skills don't appear to be up to scratch just yet :) Hopefully someone more experienced can step in and help out

jimmyeao avatar Apr 17 '21 16:04 jimmyeao

I'll see if I can find some time in the coming week. But no promises. Sorry.

mkellerman avatar Apr 17 '21 17:04 mkellerman

Hey, no need to apologise, what you have achieved already is awesome. If you find time, that would be great and really appreciated 👍🏻

Jimmy White


From: Marc R Kellerman @.> Sent: Saturday, April 17, 2021 6:26:23 PM To: mkellerman/PSTwitterAPI @.> Cc: Jimmy White @.>; Author @.> Subject: Re: [mkellerman/PSTwitterAPI] How do I upload a jpg and tweet that? (#47)

I'll see if I can find some time in the coming week. But no promises. Sorry.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mkellerman/PSTwitterAPI/issues/47#issuecomment-821857650, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABHVAB3ABMNT2GLS6QC3N33TJHAD7ANCNFSM425JV27Q.

jimmyeao avatar Apr 17 '21 22:04 jimmyeao