Facebook不支持的帖子请求

编程入门 行业动态 更新时间:2024-10-14 18:13:05
本文介绍了Facebook不支持的帖子请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经从FB.login登录了用户到我的应用程序,现在我想代表用户发布到用户时间线.我想将视频上传到用户时间轴.我正在做类似的事情:

I have logged in a user to my app from FB.login now I want to post to the user timeline on the behalf of user. I want to upload a video to the user timeline. I am doing something like:

FB.api( `/${user_id}/videos`, "POST", { "file_url": video, "description": description, "thumb": video_thumbnail, "title": title, }, function (response) { console.log("fb response") console.log(response) if (response && !response.error) { /* handle the result */ console.log("video upload response") console.log(response) } }, {scope: ['user_videos', 'user_actions.video']});

执行此操作时,出现错误提示code: 100 fbtrace_id: "F1BDJWtcTXl" message: "Unsupported post request. Please read the Graph API documentation at developers.facebook/docs/graph-api" type: "GraphMethodException"

When I do this it is giving me error saying code: 100 fbtrace_id: "F1BDJWtcTXl" message: "Unsupported post request. Please read the Graph API documentation at developers.facebook/docs/graph-api" type: "GraphMethodException"

为什么我会收到此错误?

Why I am getting this error ??

寻求帮助..

谢谢

推荐答案

使用/me/videos代替/${user_id}/videos,并使用单引号(或双引号)代替`".

Use /me/videos instead of /${user_id}/videos and use single (or double) quotes instead of "`".

此外,您仅需要publish_actions,并且需要将scope参数与FB.login一起使用. FB.api只是一个API调用.

Also, you need publish_actions only, and you need to use the scope parameter with FB.login. FB.api is just an API call.

以下是登录示例: www .devils-heaven/facebook-javascript-sdk-login/

这是用于上传视频的文档的链接: developers.facebook/docs/graph-api/reference/user/videos/#Creating

And here´s the link to the docs for uploading videos: developers.facebook/docs/graph-api/reference/user/videos/#Creating

有人建议该应用程序可能处于沙盒/开发模式,不知道为什么这应该是一个问题,但这是线程:如何修复不支持的帖子请求"在发布到FB粉丝页面时是什么?

Someone suggested that the App may be in sandbox/dev mode, no sure why this should be a problem but here´s the thread: How to fix "Unsupported post request" when posting to FB fan page?

更多推荐

Facebook不支持的帖子请求

本文发布于:2023-11-12 10:54:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1581289.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不支持   帖子   Facebook

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!