composer require codeinfo/bytedance-for-laravel
use Codeinfo\ByteDanceLaravel\Factory;
$app = Factory::platform(config('bytedance.platform'));
-
getAccessToken
$app->oauth->getAccessToken($code);
-
genrateUrl
$scope = 'user_info,video.create,item.comment,video.data'; $app->oauth->genrateUrl($scope, $redirect_uri);
$app->account
-
解密手机号
decryptMobile($string);
-
获取用户信息
userInfo($open_id, $access_token);
$app->video
-
上传视频
upload(string $open_id, string $access_token, string $video_path)
-
创建视频
create(string $open_id, string $access_token, array $form_params)
-
视频评论
comment(string $open_id, string $access_token, string $content, string $item_id, string $comment_id = '')
-
查询视频信息
data(string $open_id, string $access_token, array $item_ids)
$app = Factory::microapp(config('bytedance.microapp'));