搜索插件、代码仓与 APP 分类

插件详情v0.1.2

insta_public_api

一个用于获取公开用户 Instagram 详细信息的插件。只需将用户名传递给 InstaPublicApi 类,即可获取所需信息。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
21
喜欢数
22
Pub 分数
140

安装插件

flutter pub add insta_public_api

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

insta_public_api 包是一个 Flutter 插件,允许开发者通过提供用户名来获取公开的 Instagram 用户详细信息。它简化了与 Instagram 公开数据的集成,无需认证即可访问包括简介、粉丝数量和媒体在内的个人资料信息。该包设计简洁易用,支持 Android、iOS、Web、macOS、Windows 和 Linux 多个平台。适用于需要快速访问公开 Instagram 账号以进行展示或分析的应用。

适合场景

  • 获取公开的Instagram用户资料
  • 在应用中显示 Instagram 统计信息
  • 构建社交媒体仪表板
  • 用户资料查找工具
  • 来自公共账号的内容聚合

主要特点

  • 基于用户名的简单查找
  • 支持多个平台
  • 无需身份验证
  • 轻量且易于集成
  • 返回结构化的用户数据

适合对象

  • 社交媒体分析应用
  • 个人资料预览功能
  • 跨平台 Flutter 应用
  • 需要公共 Instagram 数据的应用
  • 寻求快速 API 集成的开发者

使用建议

  • 仅适用于公开的Instagram个人资料
  • 仅限公开可用数据
  • 依赖于 Instagram 的公开页面结构
  • 如果 Instagram 更改其前端布局,可能会失效
  • 不适用于私人账户或敏感数据

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Insta Public API

Fetch details of a public Instagram account just by entering their username

// Import the package
import 'package:insta_public_api/insta_public_api.dart';

// Initialize with username (must be public)
final ipa = InstaPublicApi('username');

// Get info like Full Name, Followers, Following etc
final info = await ipa.getBasicInfo();

print('Posts: ${info.noOfPosts}');
print('Followers: ${info.followers}');
print('Following: ${info.following}');

/*
  Basic Info contains:
    isPrivate,
    isVerified,
    profilePic,
    followers,
    following,
    fullName,
    noOfPosts,
    bio and more.
*/

// Get a List of Post with nested images and details eg. number of likes, comments, caption etc for first 12 posts.
final timelinePosts = await ipa.getTimelinePosts();

// Get List of all the posts present on the profile (by default limited to 100, can be modified)
final posts = await ipa.getAllPosts();

/*
  Each Post Contains:
    Nested images,
    no. of comments,
    no. of likes,
    captions and more.
*/

Example App

Example App
Click Here for Code

Currently Available Methods

  • String getProfilePic() returns image url of profile pic

  • BasicInfo getBasicInfo() returns fullName, followers, following etc.

  • List<String> getTimelinePostsImages() returns a List of imageUrl for first 12 posts.

  • List<Post> getTimelinePosts() returns Post with nested images and details e.g. number of likes, comments, caption etc of first 12 posts.

  • List<Post> getAllPosts() returns List of all the posts present on the profile (by default limited to 100, can be modified).

Inspired from this article

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。