Home » Php » Cant create shot via dribble API

Cant create shot via dribble API

Posted by: admin October 26, 2017 Leave a comment

Questions:

I am trying to create shot through dribbble api (http://developer.dribbble.com/v1/shots/#create-a-shot) but getting this response

{ ["url"]=> string(110) "https://dribbble.com/oauth/shots?access_token=14f04dc995beabda35bc9613628d7c089b9255c2fa946c76d0c918e271cec17d" ["content_type"]=> NULL ["http_code"]=> int(0) ["header_size"]=> int(0) ["request_size"]=> int(0) ["filetime"]=> int(0) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(0) ["namelookup_time"]=> float(0) ["connect_time"]=> float(0) ["pretransfer_time"]=> float(0) ["size_upload"]=> float(0) ["size_download"]=> float(0) ["speed_download"]=> float(0) ["speed_upload"]=> float(0) ["download_content_length"]=> float(-1) ["upload_content_length"]=> float(-1) ["starttransfer_time"]=> float(0) ["redirect_time"]=> float(0) ["redirect_url"]=> string(0) "" ["primary_ip"]=> string(0) "" ["certinfo"]=> array(0) { } ["primary_port"]=> int(0) ["local_ip"]=> string(0) "" ["local_port"]=> int(0) } 

here is my PHP

    public function create_shot($title, $image, $description = false)
{
    $query = array(
        'title' => $title,
        'image' => $image
    );

    if ($description) {
        $query['description'] = $description;
    }
    print_r("<br>crearing_shot-> ".__LINE__);
    return $this->curl_post_shot($this->short_api . "?" . 'access_token=' . $this->access_token, http_build_query($query));
}

can someone help me out?

Answers: