Giter Site home page Giter Site logo

xqhann / weibo-hit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itisbean/weibo-hit

0.0 0.0 0.0 84 KB

微博登录, 微博能量榜加油, 发微博, 转发, 评论, 点赞, 微博超话签到, 超话发贴, 微博视频播放信息等

License: MIT License

PHP 100.00%

weibo-hit's Introduction

weibo-hit

Sina weibo api for php. Including login, post, repost, comment, sign topic...

Composer install

composer require itisbean/weibohit -vvv

Demo

Demo: https://prettycrazyjoey.cn/oursong?referer=joey 左上角➡️拉開

Usage

// 引入autoload.php(框架中使用不需要)
include_once __DIR__.'/../vendor/autoload.php';
$whitInstance = \Weibohit\Weibohit::init([
    'username' => 'your account',
    'password' => 'your password',
    'doorImgPath' => 'if need door code, the door image would be saved here'
]);
// 發微博
$ret = $whitInstance->post('I am a robot');
// 評論
$whitInstance->comment($ret['data'], 'right');

Function

post

/**
 * 发微博
 * @param string $text 发送微博的文字内容
 * @return array
 */
$whitInstance->post($text);

repost

/**
 * 转发
 * @param string $mid 原贴ID
 * @param string $text 发送微博的文字内容
 * @return array
 */
public function repost($mid, $text = '');

comment from pc

/**
 * 评论帖子
 * @param string $mid 贴子ID
 * @param string $text 评论内容
 * @return array
 */
public function comment($mid, $text = '');

Comment from mobile

/**
 * 移動端評論帖子
 * @param string $mid
 * @param string $text
 * @param boolean $istry
 * @return array
 */
public function mComment($mid, $text, $istry = false);

like or cancel like

/**
 * 点赞或取消
 * @param string $mid 贴子ID
 * @return array
 */
public function like($mid);

sign in the super topic

/**
 * 超话签到
 * @param string $tid 超话ID
 * @return array
 */
public function topicSign($tid);

post in the super topic

/**
 * 超话发贴
 * @param string $tid 超话ID
 * @param string $text 贴子内容
 * @return array
 */
public function topicPost($tid, $text);

get tv info

/**
 * 微博视频信息
 * @param string $tvurl
 * @return array
 */
public function getTvinfo($tvurl);

get self info

/**
 * 获取登录用户ID
 * @return array
 */
public function getSelf()

send incrspt cards

/**
 * 送加油卡
 * @param integer $num 送卡数量
 * @param string $text 发送微博的文字内容
 * @return array
 */
public function incrspt($num = 1, $text = '');

weibo-hit's People

Contributors

itisbean avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.