使用Graph API Explorer发布照片 [英] Use Graph API Explorer to post a photo
问题描述
我的最终目标是以编程方式执行此操作,但是为了进行健全性检查,我试图使用Facebook Graph API Explorer将上传的照片(从我的计算机)发布到Facebook页面.我具有访问令牌以及photo_upload和publish_stream权限.
My ultimate goal is to do this programmatically, but as a sanity check I'm trying to just post an uploaded photo (from my computer) to a Facebook page using the Facebook Graph API Explorer. I have the access token and photo_upload and publish_stream permissions.
我只是不知道该怎么指示照片在哪里.我该怎么办?
谢谢.
I just don't understand what to do to indicate where the photo is. How can I do it?
Thanks.
推荐答案
我认为Graph API资源管理器工具不支持文件上传,因此您将无法使用它来检查上传的文件.
I don't think the Graph API explorer tool supports file upload, so you won't be able to use it to check your uploads.
Facebook接受用于图片上传的url参数-指向完整的图片url,Facebook应该选择它.由于它只是一个字符串,因此您可以使用资源管理器.
Facebook accepts a url param for image uploads - point that to a full image url, and Facebook should pick it up. Since it's just a string, you can use the Explorer for that.
但是,Facebook应该在上传照片时出现合理的错误-我将开始编写代码,而不用担心浏览器工具的问题!
However, Facebook should come back with reasonable errors for photo uploads - I'd start coding rather than worry about the explorer tool!
这篇关于使用Graph API Explorer发布照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!