Skip to content

Media not uploaded #400

@unsa1nted

Description

@unsa1nted

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions