PHPackages                             weibo/ads-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. weibo/ads-sdk-php

ActiveLibrary[API Development](/categories/api)

weibo/ads-sdk-php
=================

php SDK for Weibo AD

2.0.0(7y ago)1273PHPPHP &gt;=5.5

Since Oct 16Pushed 7y ago9 watchersCompare

[ Source](https://github.com/weiboad/weibo-ads-php-sdk)[ Packagist](https://packagist.org/packages/weibo/ads-sdk-php)[ Docs](https://developers.biz.weibo.com)[ RSS](/packages/weibo-ads-sdk-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (3)Versions (2)Used By (0)

Weibo Ads API SDK for PHP
=========================

[](#weibo-ads-api-sdk-for-php)

Installation
------------

[](#installation)

### Require

[](#require)

The PHP SDK requires PHP 5.5 or greater
The PHP SDK requires [composer](https://getcomposer.org/download/) to manage dependencies.

### Composer

[](#composer)

Add the following configuration to your `composer.json` file:

```
{
    "require": {
        "weibo/ads-sdk-php": "1.0.*"
    }
}
```

```
{
  "respositories" : [
    "type":"git",
    "url" : "https://github.com/weiboad/weibo-ads-php-sdk.git"
  ]
}
```

then install it with composer:

```
php composer.phar install --no-dev
```

This SDK and its dependencies will be installed under `./vendor`.

Usage
-----

[](#usage)

#### Init api

[](#init-api)

```
use WeiboAd\Api;

$api = new Api('your_app_id', 'your_app_secret', 'your_access_token');
```

#### Get account

[](#get-account)

```
use WeiboAd\Core\AccountApi;

$accountApi = new AccountApi($this->api);
$account = $accountApi->read();
```

#### Add and update Campaign

[](#add-and-update-campaign)

```
use WeiboAd\Core\CampaignApi;
use WeiboAd\Core\Entity\Campaign;
use WeiboAd\Core\Constant\ConfiguredStatus;
use WeiboAd\Core\Constant\MarketingObjective;

//create campaign
$campaignApi = new CampaignApi($this->api);
$campaign = new Campaign();
$campaign->setName('campaign name');
$campaign->setConfiguredStatus(ConfiguredStatus::PAUSE);
$campaign->setObjective(MarketingObjective::BRAND_AWARENESS);
$campaign->setLifetimeBudget(600);
$campaign->setGuaranteedDelivery(false);
$retCampaign = $campaignApi->create($campaign);

//update campaign budget
$campaign = $campaignApi->read($id);
$campaign->setLifetimeBudget(1000);
$retCampaign = $campaignApi->update($campaign);
```

Tests
-----

[](#tests)

### Install dependencies

[](#install-dependencies)

```
php composer.phar install --dev
```

### Execute unit tests

[](#execute-unit-tests)

```
./vendor/bin/phpunit
```

### Execute unit tests include some integration api tests

[](#execute-unit-tests-include-some-integration-api-tests)

find phpunit.xml file then add annotation

```

```

then execute phpunit command line

```
./vendor/bin/phpunit
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~435 days

Total

2

Last Release

2698d ago

Major Versions

1.0.0 → 2.0.02018-12-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/291cc6c6cd99b7c517bff98e2930f8cce8ce8027b1190681ed508e54b07f1670?d=identicon)[wzllai](/maintainers/wzllai)

---

Top Contributors

[![wzllai](https://avatars.githubusercontent.com/u/2359486?v=4)](https://github.com/wzllai "wzllai (5 commits)")[![chenxingzi](https://avatars.githubusercontent.com/u/38939330?v=4)](https://github.com/chenxingzi "chenxingzi (1 commits)")

---

Tags

weiboad sdk

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/weibo-ads-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/weibo-ads-sdk-php/health.svg)](https://phpackages.com/packages/weibo-ads-sdk-php)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

517.9M7](/packages/avalara-avataxclient)[alexacrm/dynamics-webapi-toolkit

Web API toolkit for Microsoft Dynamics 365 and Dynamics CRM

81324.1k1](/packages/alexacrm-dynamics-webapi-toolkit)[keboola/storage-api-client

Keboola Storage API PHP Client

10387.5k25](/packages/keboola-storage-api-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
