标签: instagram-api

使用 swift 5 登录 Instagram,获取 [“error_type”:OAuthException,“error_message”:无效的平台应用程序,“code”:400]

我正在尝试使用新文档登录 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

请帮我解决这个问题。

提前致谢。

ipad ios swift instagram-api

3
推荐指数
1
解决办法
3019
查看次数

订阅 Instagram 消息(Facebook 应用程序)时需要 Pages_messaging 权限

我正在创建一个应用程序,允许我按照此处的指南管理我的 Instagram 帐户

现在我正处于应用程序审核阶段,我有一个难题:

  • 理论上我不应该需要pages_messaging权限(文档没有按要求提及这一点)
  • 话虽这么说,当我拨打电话注册 Instagram 消息`POST /v11.0/{page-id}/subscribed_apps?fields=messages&access_token={access_token} 的回调时,呼叫将失败,并显示WWW-Authenticate: OAuth "Facebook Platform" "insufficient_scope" "(#200) 要订阅消息字段,需要以下权限之一:pages_messaging"(此调用与他们在文档中进行的调用相同)
  • 所以我在我的评论中添加了pages_messaging权限
  • 现在我无法通过审核,因为他们一直告诉我,我的用例(管理 Instagram 消息)不需要 Pages_messaging权限- “我们确定您的应用程序所请求的权限或功能的用例无效或者是不需要支持其核心功能。”

嗯......我错过了什么?您可以提供任何指导吗?

facebook facebook-graph-api instagram instagram-api

3
推荐指数
1
解决办法
1457
查看次数

从Instagram获取访问令牌以获取PHP上的API

我已经使用网址获得了代码: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中使用它?

php instagram instagram-api

2
推荐指数
1
解决办法
8830
查看次数

如何使用Instagram API获取图像

如何从Instagram API获取用户图像?

access_token = 4049241557.1677ed0.5324ad17d9314645b528ad112da8d56e

但是没有成功,它只给我用户信息。如何使用Instagram API获取图像?

php instagram-api

2
推荐指数
1
解决办法
2万
查看次数

什么是instagram中确切的重定向uri?如何在iOS应用中使用它?在Instagram开发人员门户上“输入有效的URL”

我使用OAuth2Swift将登录名与instagram结合使用,在以前的应用中,我做过同样的事情,但是现在遇到了问题。

我的问题与redirect_uri有关

上次使用"ig" + {client_id} + "://authorize"时,过了一段时间,对另一个应用程序做了同样的事情,然后instagram devloper门户显示“输入有效的网址”。

然后我用"https://ig" + {client_id} + "://authorize"那个时间为我工作。

但是,当我尝试所有可能的解决方案时,我现在面临着同样的问题“输入有效的网址”。

有人可以帮助我生成有效的重定向URI吗?

authentication redirect oauth ios instagram-api

2
推荐指数
1
解决办法
8558
查看次数

如何使用AVPlayer播放instagram视频

我正在尝试从共享链接播放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)

这会打开播放器,但不播放视频任何帮助表示赞赏.

xcode ios instagram swift instagram-api

2
推荐指数
1
解决办法
920
查看次数

如何使用API​​通过PHP获取instagram照片?

最近两天,我试图通过原始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)

php instagram instagram-api

2
推荐指数
2
解决办法
2万
查看次数

自从API的新变化(2018年4月4日)以来,有没有办法从Instagram帐户获取图像?

Instagram API删除了以下端点:

GET /users/search
Run Code Online (Sandbox Code Playgroud)

我用它来从我的网站上的个人资料中获取图像.

现在有办法吗?我找不到任何信息,因为这是非常新的.

instagram-api

2
推荐指数
1
解决办法
3173
查看次数

如何获取Instagram个人资料图片?

如何在Android中使用instagram API提取Instagram个人资料图片?或任何其他方法来提取Insta个人资料图片?

java android json instagram instagram-api

2
推荐指数
3
解决办法
6431
查看次数

api.instagram CORB网络错误,原因是具有Content-Type:application / json`的jsonp响应标头

我正在使用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却不起作用。

我该如何进行这项工作?

instagram-api

2
推荐指数
1
解决办法
1007
查看次数