上传过去日期的照片 [英] Upload photos for past date

查看:114
本文介绍了上传过去日期的照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试上传一些过去创作日期的旧照片,以便在时间轴上正确显示。现有的 api 只允许传递消息和源代码。



ie

  POST https://graph.facebook.com / ALBUM_ID / photos?access_token = xyz 
..multipart.form.data.with.message.and.source ..

是我上传照片的唯一方法。

  POST https://graph.facebook。 com / PHOTO_ID?access_token = xyz 
created_time = 2010-01-20T09:04Z& updated_time = 2010-01-20T09:04Z

也不会移动照片日期。



我尝试使用 / feed api,但不允许我将现有的照片发贴。它使它成为一个类型链接的帖子。



我想要完全创建一个照片对象并发布以下内容:



< pre class =lang-js prettyprint-override> {
id:xx_yy,
from:{
name:我的名称,
id:myfbid
},
story:< My Name>添加了一张新照片,
picture < PhotoJPEG>,
link:< FBPhoto_URL>,
name:Photo Name,
icon:https:// s-static
动作:[
{
name:注释,
link:https://www.facebook.com/xxx/posts/yy
},
{
name:Like,
link:https://www.facebook.com/xx/posts/yy
}
],
隐私:{
description: Group,
value:CUSTOM,
friends:SOME_FRIENDS,
allow:< GROUPID>
},
place:{
id:< placeid>,
name:< PlaceName>
},
type:photo,
object_id:12345,
created_time:2010-09-20T13:37:54 + 0000 ,
updated_time:2010-09-20T13:37:54 + 0000,
评论:{
count:0
}
}


解决方案

我是FB的工程师,但不是在平台团队,所以我不是100%最新的这个。 Graph API中的照片上传者有一个未记录的字段'backdated_time'。我认为它是超级新闻,并将在接下来的几个星期内被doc'd,但随时可以尝试在临时(并报回到这里!)。



它采用ISO-8601的时间戳记。



文档小组已被追查,以了解发生了什么。



此外,DMCS不太正确。鼓励FB工程师(特别是我们的开发人员支持团队中的人员)在这里进行聊天,以帮助您解决问题,每周在我们的开发者博客上,我们发布了多少个问题,并回答了多少问题。因此,有一个承诺要获得有关SO答案的问题 - 请参阅 https://developers.facebook.com / blog / post / 625 / 为例。



但是,现有功能的支持与新功能的错误/请求之间存在差异。如果您有错误或功能请求,请将其添加到 http://developers.facebook.com/bugs



谢谢!


I am trying to upload few old photos with a past creation date so that they appear properly in timeline. Existing api allows only to pass message and source.

i.e

  POST https://graph.facebook.com/ALBUM_ID/photos?access_token=xyz
  ..multipart.form.data.with.message.and.source..

is the only way I can upload photos.

  POST https://graph.facebook.com/PHOTO_ID?access_token=xyz
  created_time=2010-01-20T09:04Z&updated_time=2010-01-20T09:04Z

doesn't move the photo date either.

I tried creating a post out of the photo upload using the /feed api, but it doesn't allow me to make an existing photo a post. It makes it a post of type link.

What I want to exactly create a photo object and publish following:

  {
    "id": "xx_yy",
    "from": {
       "name": "My Name",
       "id": "myfbid"
    },
    "story": "<My Name> added a new photo.",
    "picture": "<PhotoJPEG>",
    "link": "<FBPhoto_URL>",
    "name": "Photo Name",
    "icon": "https://s-static.ak.facebook.com/rsrc.php/v1/yz/r/StEh3RhPvjk.gif",
    "actions": [
       {
          "name": "Comment",
          "link": "https://www.facebook.com/xxx/posts/yy"
       },
       {
          "name": "Like",
          "link": "https://www.facebook.com/xx/posts/yy"
       }
    ],
    "privacy": {
       "description": "Group",
       "value": "CUSTOM",
       "friends": "SOME_FRIENDS",
       "allow": "<GROUPID>"
    },
    "place": {
       "id": "<placeid>",
       "name": "<PlaceName>"
    },
    "type": "photo",
    "object_id": "12345",
    "created_time": "2010-09-20T13:37:54+0000",
    "updated_time": "2010-09-20T13:37:54+0000",
    "comments": {
       "count": 0
    }
  }

解决方案

I'm an Engineer at FB, but not on the Platform team so I'm not 100% up to date on this. There is an undocumented field 'backdated_time' available on the photo uploader in the Graph API. I assume it's supernew and will be being doc'd over the next few weeks, but feel free to try it in the interim (and report back here!).

It takes an ISO-8601 timestamp by the looks of it.

The docs team have been chased to figure out what's going on.

Also, DMCS isn't quite right. FB Engineers (particularly those in our Developer Support team) are encouraged to hang out here to help with questions, and each week on our developer blog we post how many questions were asked and how many were answered. So there is a commitment to getting questions on SO answered - see https://developers.facebook.com/blog/post/625/ as an example.

However, there's a difference between support of existing features and bugs/requests for new features. If you have a bug or feature request, add it to http://developers.facebook.com/bugs.

Thanks!

这篇关于上传过去日期的照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆