erlang/chicagoboss中的Instagram实时API
我正试图在chicagoboss应用程序中实现instagram实时照片更新 当我请求具有以下内容的位置时erlang/chicagoboss中的Instagram实时API,erlang,instagram-api,chicagoboss,Erlang,Instagram Api,Chicagoboss,我正试图在chicagoboss应用程序中实现instagram实时照片更新 当我请求具有以下内容的位置时 curl -F 'client_id=CLIENT-ID' \ -F 'client_secret=CLIENT-SECRET' \ -F 'object=location' \ -F 'aspect=media' \ -F 'object_id=1257285' \ -F 'callback_url=http://YOUR-CALLBAC
curl -F 'client_id=CLIENT-ID' \
-F 'client_secret=CLIENT-SECRET' \
-F 'object=location' \
-F 'aspect=media' \
-F 'object_id=1257285' \
-F 'callback_url=http://YOUR-CALLBACK/URL' \
https://api.instagram.com/v1/subscriptions/
我希望我的应用程序响应instagram服务器发送的GET
http://my-website.com/subscribe/?hub.mode=subscribe&hub.challenge=15f7d1a91c1f40f8a748fd134752feb3&hub.verify_token=myVerifyToken
使用15f7d1a91c1f40f8a748fd134752feb3
下面是我的代码到现在的样子
src/controller/example_controller.erl
任何关于如何做到这一点的建议或建议都将不胜感激
-module(example_controller, [Req]).
-compile(export_all).
% Get parameters
subscribe('GET', []) ->
%Split into parameters to get verify_token
% Set value of hub.challenge to Challenge variable
RequestBody = string:tokens(binary_to_list(Req:request_body()), "&"),
cowboy_req:reply(200, Challenge).