tofers/instagram-post-info

获取Instagram上帖子的数据。昵称,位置,发布日期,点赞数,照片。

安装: 25

依赖: 0

建议者: 0

安全: 0

星级: 2

关注者: 2

分支: 0

公开问题: 0

类型:对象

1.0.7 2020-10-23 08:19 UTC

This package is auto-updated.

Last update: 2024-09-23 18:28:09 UTC


README

Instagram帖子信息 - 昵称,图片,日期,点赞,位置

获取Instagram上帖子的数据。昵称,位置,发布日期,点赞数,照片。

只有来自Instagram的公开帖子的链接才能工作,如果是公开账号,结果将出错。

安装

安装此扩展的首选方式是通过Composer

运行以下命令之一

composer require tofers/instagram-post-info

"tofers/instagram-post-info": "*"

将以下内容添加到您的composer.json文件的require部分。

使用方法

查看它的工作方式

https://chitoff.ru/instagram

在您的视图中设置扩展链接

<?php

use tofers\instagrampost\InstagramPostInfo;

$instagram_post = new InstagramPostInfo("https://www.instagram.com/p/CB7KzC6BPIn/"); 

echo 'instagram link: ' . $instagram_post->src;
echo '<br>';
echo '<br>';
echo 'Account name: ' . $instagram_post->account;
echo '<br>';
echo '<br>';
echo 'Image src: ' . $instagram_post->image;
echo '<br>';
echo '<br>';
echo 'Date post: ' . $instagram_post->date;
echo '<br>';
echo '<br>';
echo 'Like post: ' . $instagram_post->like;
echo '<br>';
echo '<br>';
echo 'Location: ' . $instagram_post->location;


?>