It asks for a photo id which I guess is the id of a photo from the users album. I am trying to update the photo, though think that first need to update that photo in album to retrieve the photo id
您可以通过常规照片 API 获取图片(位于“封面照片”相册中),也可以在 用户对象 - 一个示例调用 /me?fields=cover 来检索它。
没有 API 可以设置用户封面照片,而且我不知道有任何添加照片的计划。
可以使用 API 编辑页面的封面照片 - 请参阅Pages API 文档欲了解更多信息 - 您使用页面访问令牌向 /PAGE_ID?cover=<页面相册中照片的 ID> 发出 POST 请求
You can get the picture via the regular photo APIs (it's in the 'Cover Photos' album) and also in the cover field of the User object - a sample call being /me?fields=cover to retrieve it.
There's no API to set the User cover photo and I'm not aware of any plans to add one.
Pages' cover photos can be edited using the API - see the Pages API documentation for more information - you make a POST request to /PAGE_ID?cover=<ID of a photo in the page's album> with the Page access token
发布评论
评论(4)
不支持更改用户个人资料封面的 API,但您可以上传照片,然后将用户重定向到:
http://www.facebook.com/profile.php?preview_cover=PHOTO_ID
There´s no API support for changing user profile cover, but you can upload a photo and then redirect user to:
http://www.facebook.com/profile.php?preview_cover=PHOTO_ID
有一个用于更新页面上封面照片的 API
http://developers.facebook .com/docs/reference/api/page/
它要求提供照片 ID,我猜这是用户相册中照片的 ID。我正在尝试更新照片,但认为首先需要更新相册中的照片以检索照片 ID
There is an API for updating the cover photo on a page
http://developers.facebook.com/docs/reference/api/page/
It asks for a photo id which I guess is the id of a photo from the users album. I am trying to update the photo, though think that first need to update that photo in album to retrieve the photo id
您可以通过常规照片 API 获取图片(位于“封面照片”相册中),也可以在 用户对象 - 一个示例调用
/me?fields=cover
来检索它。没有 API 可以设置用户封面照片,而且我不知道有任何添加照片的计划。
可以使用 API 编辑页面的封面照片 - 请参阅Pages API 文档欲了解更多信息 - 您使用页面访问令牌向
/PAGE_ID?cover=<页面相册中照片的 ID>
发出 POST 请求You can get the picture via the regular photo APIs (it's in the 'Cover Photos' album) and also in the
cover
field of the User object - a sample call being/me?fields=cover
to retrieve it.There's no API to set the User cover photo and I'm not aware of any plans to add one.
Pages' cover photos can be edited using the API - see the Pages API documentation for more information - you make a POST request to
/PAGE_ID?cover=<ID of a photo in the page's album>
with the Page access token