在2012年Facebook备受瞩目的收购之后,Instagram采用了两套API供第三方使用。这些是Instagram图API和Instagram基本显示API。但是,如果您想获得有关Instagram业务和创建者帐户的更多复杂的社交媒体互动数据,指标和见解,那么您将需要Instagram Graph API。我将为您提供有关两套API以及如何开始的概述。此过程应导致您获得API访问令牌,您将在每个请求中使用它。
>
>请记住,有两种不同的指南来设置内容:>
如果您希望使用Instagragm Graph api与您的应用程序进行访问,请按照本指南进行访问。 API),请遵循本指南。 您还应注意,使用某些API的能力可能取决于您在App Dashboard中为每个令牌设置的权限。 For this reason, I suggest that you first read this article to see which permission is required for which task.Using the access token from your app, you can query the API with any HTTP client of your choice.
Basic Display APIWith the Instagram Basic Display API, you can tell users of your app to grant you permission to get basic profile information, photos, and videos on their Instagram帐户。该API是针对非企业和非创建器Instagram用户创建的。字段
(可选):API返回的字段和边缘的逗号分隔列表。如果省略,将返回默认字段。curl -X GET \<br> 'https://graph.instagram.com/13445686989093505?fields=id,media_type,media_url,username,timestamp&access_token=IGQVJ...'<br>
{<br> "id": "13445686989093505",<br> "media_type": "IMAGE",<br> "media_url": "https://fb-s-b-a.akamaihd.net/...",<br> "username": "ubahthebuilder"<br> "timestamp": "2022-07-20T18:10:00+0000"<br>}<br>
,网站。以下图像描述了这些字段中的每个字段。这些边缘在以下图像中描述。要获取这些数据,您只需要将相应的边缘作为IG用户端点的附加路径参数包含。例如,以下端点在IG用户上获取媒体的集合:> instagram Graph Api api
您可以使用其REST ENDPOINTS使用任何平台或编程语言访问Instagram API。示例是Axios(Node.js),Net :: HTTP(Ruby),请求(Python)和Guzzlehttp/guzzle(php)。
>>更多的社交媒体教程编码
我们已经在本文中看到了一些Instagram API示例。是时候到了
以上是Instagram API简介的详细内容。更多信息请关注PHP中文网其他相关文章!