Skip to content

Can't post tweet with image #125

@OneSecure

Description

@OneSecure

Hi friends, I‘m try this crate and I can post a text tweet success.
But when I use examples/create_tweet.rs file to post a image jpg file, I always failed.

how do i do it right?

I run with this command cargo run --example create_tweet -- "Some image" --alt-text "alt text" --media "/home/ubuntu/a.jpg"

the error info is

Waiting for media to finish processing..Error: TwitterError(

{
  "date": "Fri, 12 Nov 2021 08:13:28 GMT",
  "vary": "Origin",
  "pragma": "no-cache",
  "server": "tsa_a",
  "status": "404 Not Found",
  "expires": "Tue, 31 Mar 1981 05:00:00 GMT",
  "set-cookie": "personalization_id=\"kkkkkk==\"; Max-Age=63072000; Expires=Sun, 12 Nov 2023 08:13:28 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None",
  "set-cookie": "lang=en; Path=/",
  "set-cookie": "guest_id=v1%hhhh; Max-Age=63072000; Expires=Sun, 12 Nov 2023 08:13:28 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None",
  "content-type": "application/json;charset=utf-8",
  "cache-control": "no-cache, no-store, must-revalidate, pre-check=0, post-check=0",
  "last-modified": "Fri, 12 Nov 2021 08:13:28 GMT",
  "x-transaction": "ccc2fbfac7b4fa36",
  "content-length": "68",
  "x-access-level": "read-write",
  "x-frame-options": "SAMEORIGIN",
  "x-xss-protection": "1; mode=block",
  "content-disposition": "attachment; filename=json.json",
  "timing-allow-origin": "https: //twitter .com, https: //mobile.twitter .com",
  "x-twitter-response-tags": "BouncerCompliant",
  "strict-transport-security": "max-age=631138519",
  "x-response-time": "15",
  "x-connection-hash": "ddddddd"
},

TwitterErrors { errors: [TwitterErrorCode { message: "Sorry, that page does not exist", code: 34 }] })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions