【问题标题】:Instagram API for implementing Instagram Video Downloader, InstaDP and Instagram Stories用于实现 Instagram Video Downloader、InstaDP 和 Instagram Stories 的 Instagram API
【发布时间】:2020-04-26 17:06:19
【问题描述】:
我正在搜索获取用户 DP 和故事的 Instagram API。我尝试了一些方法,例如从 https://api.instagram.com/v1/users/{user-id}/media/recent?callback=&client_id={client_id} 获取 DP,但它一次又一次地被阻止并在我拥有的 Instagram 应用程序上提示一个活动弹出窗口接受几次。有谁知道他们为所有 Instagram 工具 https://instadownloaderpro.com 使用什么 API,尤其是 Instagram Video Downloader 工具?我也尝试了 mgp25/Instagram-API,但它不允许我获得 Insta DP 和 Stories。 Facebook Graph API 是否在这种情况下工作?
【问题讨论】:
标签:
instagram
instagram-api
instagram-graph-api
instagram-story
【解决方案1】:
You could use this code for InstaDP
use MetzWeb\Instagram\Instagram;
$instagram = new Instagram(array(
'apiKey' => 'YOUR_APP_KEY',
'apiSecret' => 'YOUR_APP_SECRET',
'apiCallback' => 'YOUR_APP_CALLBACK'
));
// grab OAuth callback code
$code = $_GET['code'];
// or maybe $code = $request->code; // if you are using Laravel
$data = $instagram->getOAuthToken($code);
// set user access token
$instagram->setAccessToken($data);
// and
$pictures = $instagram->getUserMedia();