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

插件详情v0.2.3

instagram_public_api

Flutter 包,用于获取 Instagram 用户详细信息并下载帖子。

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

安装插件

flutter pub add instagram_public_api

插件介绍

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

一个 Flutter 包,使开发者能够从 Instagram 的公共 API 直接获取公开的 Instagram 用户详细信息和下载媒体帖子。它支持 Android、iOS、Web、macOS、Windows 和 Linux 多个平台,非常适合跨平台社交媒体应用。该包简化了与 Instagram 公共数据的集成,无需认证即可访问个人资料信息和图片/视频内容。对于专注于社交媒体聚合、内容发现或分析的应用程序尤其有用。

适合场景

  • 社交媒体内容聚合
  • 用户资料信息检索
  • 媒体帖子下载
  • 内容发现工具
  • 分析仪表板

主要特点

  • 跨平台支持
  • 公共数据访问
  • 个人资料和帖子检索
  • 无需身份验证
  • 与 Flutter 的轻松集成

适合对象

  • Flutter 开发人员构建社交应用
  • 需要公共 Instagram 数据的应用
  • 公共帖子的内容抓取器
  • 跨平台社交媒体工具

使用建议

  • 仅限公开数据
  • 无法访问私人账户
  • 可能会应用速率限制
  • 依赖于Instagram公开API的稳定性

原始 README

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

instagram_public_api

Flutter package to get Instagram user details and download posts.

How to Use

To use instagram_public_api, first start by importing the package.

import 'package:instagram_public_api/instagram_public_api.dart';

Get profile details

  FlutterInsta insta = FlutterInsta();
  //Get Profile Details(must be public)
  InstaProfileData user = await insta.getProfileData("thefluttercommunity");
  print(user.username);
  print(user.profilePicURL);
  print(user.bio);
  print(user.externalURL);
  print(user.followers);
  print(user.following);
  print(user.isVerified);
  print(user.isPrivate);
  print(user.username);

Get Pots details

//Get Post Details (Post with nested images and video and details) (must be public)
  final List<InstaPost> post = await FlutterInsta().getPostData(
      "https://www.instagram.com/p/CLXXql8gwpo/?utm_source=ig_web_copy_link");
  for (int i = 0; i < post.length; i++) {
    print(post[i].dimensions);
    print(post[i].displayURL); //post download url
    print(post[i].postType);
    print(post[i].thumbnailDimensions);
    print(post[i].thumbnailUrl);
    print(post[i].user.followers);
    print(post[i].user.isPrivate);
    print(post[i].user.isVerified);
    print(post[i].user.posts);
    print(post[i].user.profilePicURL);
    print(post[i]..user.username);
    print(post[i].videoDuration);
  }

Project Created & Maintained By

Gunanithi

Passionate #Flutter, #Android Developer. #UI Designer.

Currently Available Methods

  • InstaProfileData getProfileData() returns user details

  • List<InstaPost> getPostData() returns Post Details (Post with nested images and video and details)

The limitations or problems you may bump into using this package.

Rate limiting:

Instagram allows a maximum of around 200–300 request hits per hour. After reaching the limit, you’ll start getting the server error.

No Insight Data:

You cannot get Instagram insight data using this API. Look into FB Instagram Insight API.

No Private Account Data:

Since this works on publically available API’s, you cannot get private account data.

Inspired from this article

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。