4

I am developing a iOS app in which i need to support upload multiple photos to Facebook from app.

From many discussed forums and doc, i know that using batch request it is possible.

For the first batch request with multiple photos, the default album is created and added the photos in that album. From next request, all the images those uploaded via batch request are added in that album which is created by default at previous.

So all the images are grouped as a single album. So it is showing only one entry in Facebook timeline.

But i want to show them as separate post instead of a single album entry. For example, if we upload 2 photos from Facebook, it will show as separate entry and so on.

So i need, how to upload multiple photos in Facebook like timeline post not like album post using Facebook iOS SDK?

Jayaprakash
  • 1,407
  • 1
  • 9
  • 19

2 Answers2

2

As far as I know you should do the following:

You can use the *object_attachment* field of the latter to link to the individual photo's object id.

Tobi
  • 31,405
  • 8
  • 58
  • 90
  • Thanks for your reply. It will create album for every post which might be annoying for users. So, we are looking for other options like Open Graph stories. – Jayaprakash Feb 06 '14 at 14:59
  • You're welcome! You can also try what I described here if this suits you better: http://stackoverflow.com/questions/21589152/facebook-api-100-error/21599648#21599648 If you find the answer useful, please accept it. – Tobi Feb 06 '14 at 15:02
  • you can use Open Graph story but u wont be able to post to facebook Page only to Profile – Dima Oct 30 '15 at 20:07
0

Well, That's funny because I'm looking for a way to avoid what you want...

If you just do that (I'm using PHP):

        $tmp_type = $the_page_id."/photos";

        $batch = [
        'photo_1' => $fb->request('POST', $tmp_type, [
         'message' => 'Foo photo 1 test',
         'url' => 'http://www.your_domaine/1.jpg',
         ]),
        'photo_2' => $fb->request('POST', $tmp_type, [
        'message' => 'Bar photo 2 test',
         'url' => 'http://www.your_domaine/1.jpg',
          ]),
        ];

        $response = $fb->sendBatchRequest($batch,$the_token_of_the_page);

so if you don't post in an album but directly inside the page (so {page-id}/photos rather than {album-id}/photos), the photos will be saved in the Timeline Album and each photo will produce one entry.

Hope this will help you.

Peter
  • 1,247
  • 19
  • 33