如何获取 Facebook 访问令牌

How to get Facebook access token

根据这个 documentation 我尝试向图表发送获取请求 api

curl -X GET "https://graph.facebook.com/oauth/access_token
  ?client_id={your-app-id}
  &client_secret={your-app-secret}
  &grant_type=client_credentials"

但我收到一条错误消息

{
    "error": {
        "message": "Missing redirect_uri parameter.",
        "type": "OAuthException",
        "code": 191,
        "fbtrace_id": "AFBj5BLV5WZ0ZTlT62XuaVb"
    }
}

有人知道我做错了什么吗?谢谢

PS:我不想登录用户我想为 FB 应用程序下载 Instagram 图片....

就您而言,我发现您需要在 Facebook Apps 中申请一个应用程序
现在您可以在 https://developers.facebook.com/apps/

中看到

举例:
你做一个application
之后Facebook会重新生成App ID和App Secret
然后输入到

curl -X GET "https://graph.facebook.com/oauth/access_token
  ?client_id={your-app-id}
  &client_secret={your-app-secret}
  &grant_type=client_credentials"

示例:

curl -X GET "https://graph.facebook.com/oauth/access_token
  ?client_id=336055786532989
  &client_secret=46ff578663d95d62fa22f257cabe62ce
  &grant_type=client_credentials"