从客户端的Instagram API [英] Instagram API from client side

查看:139
本文介绍了从客户端的Instagram API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从客户端调用Instagram的API端点。我只能使用JSONP访问基于GET的端点, Instagram建议。对于那些需要POST或DELETE,似乎CORS没有启用,所以这些类型的ajax调用失败。

I'm trying to call Instagram API endpoints from the client side. I can only access GET-based endpoints using JSONP, which Instagram recommends. For those requiring POST or DELETE, it seems CORS isn't enabled, so these types of ajax calls fail.

有没有任何方法或方法,我可以使用访问这些来自客户端的API?

Is there any method or approach I can use to access these APIs from the client side?

推荐答案

不能直接从客户端进行POST调用,您必须设置代理服务器使得Instagram API调用POST和DELETE,您的客户端应用程序可以调用代理服务器。

Not possible to make POST calls directly from client side, You have to setup a proxy server that makes the Instagram API calls for POST and DELETE, and your client side app can call the proxy server.

这篇关于从客户端的Instagram API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆