Search code examples
pythonfacebookfacebook-graph-apitornado

facebook upload photo in album in sequence


I am working on application which create the album and same time upload the photos in our application. We have sequence in uploading the all photos in album like (day1,day2 wise photo sequence)

The problem is we want upload this album photo on facebook. We got successfully uploaded the photos on facebook too which was created on our web application.

But our requirement to upload facebook photos in some order. How to achieve this because all uploaded photos dont have any order.

for image in photos_to_upload:

        photo_description = 'Test have been updated for upload the photoes'
        graph = GraphAPI(user["access_token"])
        graph.put_object('v2.2/%s' % (facebook_album_id), 'photos', query={'message':photo_description, 'url':image, 'no_story':True}, callback=self._album_photo_uploaded_on_facebook)

photos_to_upload have already in order.

Thanks,


Solution

  • There isn't any way to specify ordering in the API other than spacing out the time between each photo post. Even then you aren't guaranteed that the user wouldn't just change the sequence by editing something.