Various technical articles, IT-related tutorials, software information, and development journals
Thursday, May 21, 2020
Facebook's /me/feed endpoint can't create posts with just one image
I recently wrote a script to migrate posts from a Facebook download-your-information archive to a new Page, including all attached photos. Since many of the posts had multiple images, I had the script upload each as photo to the /me/photos endpoint unpublished, then attach all of them to one new post created with /me/feed. I then made another request to edit the post to backdate it. This worked perfectly for posts with multiple images, but for posts with just one image, the backdating request failed with "you cannot backdate unpublished posts." Apparently single-photo posts are a different kind of thing than posts with multiple photo attachments. For the former, I had to make a normal (published) /me/photos request and get the post_id from that for backdating.
Labels:
facebook
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment