Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media not uploaded #400

Open
unsa1nted opened this issue Sep 24, 2022 · 0 comments
Open

Media not uploaded #400

unsa1nted opened this issue Sep 24, 2022 · 0 comments
Labels

Comments

@unsa1nted
Copy link

Hi, i have a code like this :

if(!empty($request->images)){
    		foreach ($request->images as $key => $value) {
    			$uploaded_media = Twitter::uploadMedia(['media' => File::get($value->getRealPath())]);
    			if(!empty($uploaded_media)){
                    $newTwitte['media_ids'][$uploaded_media->media_id_string] = $uploaded_media->media_id_string;
                }
    		}
    	}

But after i test it upload 1 image , there is no image on status twitter.

I've to try dump and die and get like this

{#1356 ▼
  +"media_id": 1573632180668231680
  +"media_id_string": "1573632180668231680"
  +"size": 150424
  +"expires_after_secs": 86400
  +"image": {#1354 ▼
    +"image_type": "image/jpeg"
    +"w": 2000
    +"h": 2000
  }
}

It's something wrong or ???
Please help, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants