如何将照片上传到特定相册,如果不存在,请创建该专辑? [英] How to upload a photo to a specific album and if not exist create that album?
本文介绍了如何将照片上传到特定相册,如果不存在,请创建该专辑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个将照片上传到用户个人资料的应用程序
i have a app that upload a photo to users profile
但是当它上传照片时,会转到使用应用名称命名的新相册。
but when it upload a photo it goes to a new album named with a app name.
我想做的是将照片上传到我所命名的相册,如
what i want to do is upload photo to a album named by me like
我的测试相册或某些东西
"my test album" or some thing.
当我的相册不存在时,应该创建一个专辑my test album。
and when the album my test album doesn't exist it should create a album "my test album".
推荐答案
首次上传时,您可以创建专辑:
On first upload you can create the album :
$facebook->api('/me/albums','post',$album_details);
并保存返回的album_id。
对于顺序上传,您可以致电:
and save the album_id that is returned.
Then for sequential uploads you can make calls to :
$facebook->api('/'.$album_id.'/photos','post',$photo_details);
它全部覆盖在这个Facebook开发者博客。
这篇关于如何将照片上传到特定相册,如果不存在,请创建该专辑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文