简体   繁体   中英

Can I use Pixabay API in My Wallpaper App?

I recently created a wallpaper app. I want to ask, do Pixabay allow to show their photos as wallpaper in a Wallpaper Application.

Website: pixabay.com

Yes you can. The PHP library I tested is from Zoonman PHP API Code on GitHub

Then obtain a Developer Account on Pixabay Developer API

There after install the library on your server and obtaining images URLs etc is just simple like this code asking for images on 'nature'. Change the query keyword and you will get images for that.

<?php

require_once 'vendor/autoload.php';

$pixabayClient = new \Pixabay\PixabayClient([
  'key' => 'yourPixabayKey'
]);

// test it
$results = $pixabayClient->get(['q' => 'nature'], true);
// show the results
var_dump($results);

Use data fields returned by the API to create your wallpaper App gallery.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM