• Resolved kirktsao

    (@kirktsao)


    I use Youku as provider when i post videos.
    But it’s can’t get the thumbnails.
    I found there need “client_id” for query the thumbnail_url
    I have not learn PHP, and just modify 2 line of class-youku-thumbnails.php

    
    	public function get_thumbnail_url( $id ) {
    		$request = "https://openapi.youku.com/v2/videos/show.json?video_id=_"+$id+"&client_id=xxxxxxxxxx";  ## 1st place. My query url +videoid+ client_id
    		$response = wp_remote_get( $request );
    		if( is_wp_error( $response ) ) {
    			$result = $this->construct_info_retrieval_error( $request, $response );
    		} else {
    			$result = json_decode( $response['body'] );
    			$result = $result->thumbnail; ##2nd place. Original is $result ->data[0]->logo;
    		}
    		return $result;
    	}

    Maybe my modify was wrong, But when I use Bulk to scanned posted.
    It’s will show find new thumbnail. object Object
    How can i make is avaiable
    Thanks anybody send help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kirktsao

    (@kirktsao)

    Follow Image Is Bulk results.Show 2 post new Thumbnail.
    But it’s not post to my Databases.
    Bulk Scanned

    DataBase
    Database

    When i back to video page.and scan thumbnail.
    It’s show error.But not show details in debug.log
    Code

    Here’s the code i modified.
    Video Page notify Error:URL invalid

    • This reply was modified 8 years, 6 months ago by kirktsao.
    • This reply was modified 8 years, 6 months ago by kirktsao.
    • This reply was modified 8 years, 6 months ago by kirktsao.
    • This reply was modified 8 years, 6 months ago by kirktsao.
    Thread Starter kirktsao

    (@kirktsao)

    The Result from the browser by type the URL.

    Thread Starter kirktsao

    (@kirktsao)

    public function get_thumbnail_url( $id ) {
    $request = “https://openapi.youku.com/v2/videos/show.json?video_id=$id&client_id=xxxxxxxxx”; ###### client_id need to get from Youku.
    $response = wp_remote_get( $request );
    if( is_wp_error( $response ) ) {
    $result = $this->construct_info_retrieval_error( $request, $response );
    } else {
    $result = json_decode( $response[‘body’] );
    $result = $result->bigThumbnail;
    }
    return $result;
    }

    It’s work

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No video thumbnail for this post’ is closed to new replies.