我正在制作一个应用程序,我需要访问其中的人物收件箱和附件(贴纸和图像)。
从谷歌搜索看起来相当困难,使用图形api是不可能的,并且没有很好的记录,虽然我有权使用“read_inbox”。
我发现的是,我可以使用FQL查询特定消息的附件。这是我的疑问:
SELECT attachment FROM message WHERE message_id = "730111050341010_3" ORDER BY created_time DESC LIMIT 100 OFFSET
这给了我没有错误,并且当附件是贴纸时它返回有效的“附件 - >媒体” - 阵列。看看这个结果:
[{"attachment":{"media":[{"href":"https:\/\/fbcdn-dragon-a.akamaihd.net\/hphotos-ak-prn1\/t39.1997\/851577_246547505491999_862435009_n.png","alt":"","type":"link","src":"https:\/\/fbcdn-dragon-a.akamaihd.net\/hphotos-ak-prn1\/t39.1997\/851577_246547505491999_862435009_n.png"}],"name":"","href":"https:\/\/fbcdn-dragon-a.akamaihd.net\/hphotos-ak-prn1\/t39.1997\/851577_246547505491999_862435009_n.png","caption":"","description":"","properties":[],"icon":"https:\/\/fbstatic-a.akamaihd.net\/rsrc.php\/v2\/yD\/r\/aS8ecmYRys0.gif","tagged_ids":[],"sticker_id":"227878347358915"}}]
但是只要是用户上传的图片,它就会返回:(没有图片的痕迹[没有媒体数组,也没有href-field])
[{"attachment":{"media":[],"name":"","caption":"","description":"","properties":[],"fb_object_type":"","fb_object_id":"","icon":"https:\/\/fbstatic-a.akamaihd.net\/rsrc.php\/v2\/yD\/r\/aS8ecmYRys0.gif","tagged_ids":[]}}]
我有什么方法可以从Facebook上获得用户上传的附件?
顺便说一下。 View attachments in threads似乎没有返回任何“附件” - 对我来说是