6

So. I can't make this work and i can't find any solution about this.

Here is my code.

        $result1 = $facebook->batchApi('***********/feed', 'POST', array(
            'attached_files' => $facebook->attachFile($uploads[2]),
        ));
        $result2 = $facebook->batchApi('*********/feed', 'POST', array(
            'attached_files' => $facebook->attachFile($uploads[1]),
        ));
        $res = $facebook->processBatch(array(
            "access_token" => $user_profile['data'][0]['access_token'],
        ));

I'm using facebook-batch-api. It's just simple wrapper for batch requests. Need make post like this https://www.facebook.com/centrMAN/posts/587573351326832

Sahil Mittal
  • 20,697
  • 12
  • 65
  • 90
user2995220
  • 71
  • 1
  • 5

1 Answers1

3

You cannot post multiple images to a single feed. (Dosen't make any sense either)

The example link that you've mentioned in simply posting photos, not adding photos to a feed.

So, instead of /feed, simply use the /photos API to get the result.

Sahil Mittal
  • 20,697
  • 12
  • 65
  • 90
  • I find some kind of suggestion. https://developers.facebook.com/docs/opengraph/using-actions/#photos. So i need to create users stories, then i can publish multiple images in single post. – user2995220 Mar 14 '14 at 08:00
  • It seems that now you can https://developers.facebook.com/docs/graph-api/photo-uploads#publishing-a-multi-photo-story – Ionut Necula Feb 07 '17 at 08:30