我正在尝试使用新文档登录 Instagram,并收到错误,例如Invalid platform app, "code": 400
我使用https://api.instagram.com/oauth/authorize成功获取代码,获取代码后我调用https://api.instagram.com/oauth/access_token获取 access_token 但它给了我错误。
我正在关注此文档:https ://developers.facebook.com/docs/instagram-basic-display-api/getting-started
请帮我解决这个问题。
提前致谢。
我正在创建一个应用程序,允许我按照此处的指南管理我的 Instagram 帐户
现在我正处于应用程序审核阶段,我有一个难题:
嗯......我错过了什么?您可以提供任何指导吗?
我已经使用网址获得了代码:https : //api.instagram.com/oauth/authorize/? client_id = CLIENT-ID & redirect_uri = REDIRECT-URI & response_type = code
之后在Instagram文档上给出以下代码:
curl -F 'client_id=CLIENT_ID' \
-F 'client_secret=CLIENT_SECRET' \
-F 'grant_type=authorization_code' \
-F 'redirect_uri=AUTHORIZATION_REDIRECT_URI' \
-F 'code=CODE' \
https://api.instagram.com/oauth/access_token
Run Code Online (Sandbox Code Playgroud)
如何在PHP中使用它?
如何从Instagram API获取用户图像?
access_token = 4049241557.1677ed0.5324ad17d9314645b528ad112da8d56e
但是没有成功,它只给我用户信息。如何使用Instagram API获取图像?
我使用OAuth2Swift将登录名与instagram结合使用,在以前的应用中,我做过同样的事情,但是现在遇到了问题。
我的问题与redirect_uri有关
上次使用"ig" + {client_id} + "://authorize"时,过了一段时间,对另一个应用程序做了同样的事情,然后instagram devloper门户显示“输入有效的网址”。
然后我用"https://ig" + {client_id} + "://authorize"那个时间为我工作。
但是,当我尝试所有可能的解决方案时,我现在面临着同样的问题“输入有效的网址”。
有人可以帮助我生成有效的重定向URI吗?
我正在尝试从共享链接播放Instagram视频,我使用了以下代码,但它没有流,是否需要任何额外的步骤?任何能在Facebook上获得图形API的源视频网址的API?
网址如下https://instagram.com/p/BOzamYMA-vb/
let videoURL = NSURL(string: "https://instagram.com/p/BOzamYMA-vb/")
let player = AVPlayer(url: videoURL! as URL)
let playerViewController = AVPlayerViewController()
playerViewController.player = player
self.present(playerViewController, animated: true) {
playerViewController.player!.play()
}
Run Code Online (Sandbox Code Playgroud)
这会打开播放器,但不播放视频任何帮助表示赞赏.
最近两天,我试图通过原始PHP显示来自Instagram个人资料的照片。但是我遇到了这些错误。
Notice: Trying to get property of non-object in E:\xampp7\htdocs\instagram\index.php on line 29
Warning: Invalid argument supplied for foreach() in E:\xampp7\htdocs\instagram\index.php on line 29
Run Code Online (Sandbox Code Playgroud)
我从instagram API 创建了正确的身份验证。我请求的API clients access有效(clientId, userId, accessToken)。当我用PHP失败时,我尝试使用JavaScript插件instafeedjs。现在,它运行良好。这是我的PHP代码,如下所示:
<body>
<?php
function fetchData($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
$result = fetchData("https://api.instagram.com/v1/users/3550421370/media/recent/?access_token=MY_VALID_ACCESS_TOKEN_IS_HERE");
$result = json_decode($result);
foreach ($result->data as $post) {
if(empty($post->caption->text)) {
// Do Nothing
}
else { …Run Code Online (Sandbox Code Playgroud) Instagram API删除了以下端点:
GET /users/search
Run Code Online (Sandbox Code Playgroud)
我用它来从我的网站上的个人资料中获取图像.
现在有办法吗?我找不到任何信息,因为这是非常新的.
如何在Android中使用instagram API提取Instagram个人资料图片?或任何其他方法来提取Insta个人资料图片?
我正在使用fetch-jsonp进行抓取,https://api.instagram.com/oembed/?url=<embedUrl>以使用response.html嵌入到我的网站中。
但是我的请求出现CORB错误时遇到了问题。
这是我的代码片段:
fetchJsonp("https://api.instagram.com/oembed/?url=" + url, {
timeout: 800,
}).then(function(response) {
return response.json();
})
Run Code Online (Sandbox Code Playgroud)
我的控制台:
Cross-Origin Read Blocking (CORB) blocked cross-origin response https://api.instagram.com/oembed/?url=<embedUrl> with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.
Run Code Online (Sandbox Code Playgroud)
我通过相同的代码访问来处理来自twitter的嵌入,https://api.twitter.com/1/statuses/oembed.json?url=<embedUrl>并且效果很好。
由于twitter响应具有a的Content-Type: application/javascript作用,而instagram响应具有a的作用Content-Type: application/json却不起作用。
我该如何进行这项工作?