ruby-on-rails - 适用于 Ruby on Rails 的 Instagram Webhook
问题描述
webhook 的文档在 javascript 中,我正在寻找 rails 代码。
app.post('/instagram', function(req, res) {
console.log('Instagram request body:');
console.log(req.body);
// Process the Instagram updates here
received_updates.unshift(req.body);
res.sendStatus(200);
});
'req.body',我如何在 Rails 控制器中输入它?
这是 webhook 的整个示例项目的链接。 https://github.com/fbsamples/graph-api-webhooks-samples/blob/master/heroku/index.js
我正在尝试在 Instagram 媒体帖子中获得评论。
解决方案
推荐阅读
- reactjs - 我想在 react.js 中使用 Carousel 自动滑动图像,但它没有在卡片媒体中显示图片
- reactjs - vs code auto format on save disable for react
- r - 将上标添加到 ggplot2
- python-3.x - 如何使 ModelForm 避免对进入更新的实例进行表单验证?
- html - html css中的位置属性
- google-kubernetes-engine - 从本地机器连接到私有 GKE 集群
- authentication - 为 websocket 传输类型添加身份验证标头
- node.js - 如何在 Plesk 上部署前端和后端
- vue.js - vuetify:为什么每当用户点击输入字段时对表格进行排序
- nlp - Unstructured data not template based to structured data