在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>,關注者_Count
,網站。以下圖像描述了這些字段中的每個字段。這些邊緣在以下圖像中描述。要獲取這些數據,您只需要將相應的邊緣作為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中文網其他相關文章!