0

I'm building this batch in order to get all the share counts for all the pictures in an album (and like and comments on each photo):

My Batch:

[
 {
   "method":"GET",
   "name":"get-photos",
   "relative_url":"951337131548012?fields=photos.limit(250){likes.limit(1),comments.limit(1),id,source,page_story_id},likes.limit(1)"
 },
 {
   "method":"GET",
   "relative_url":"{result=get-photos:$.photos.data.*.page_story_id}?fields=shares"
 }
]

It always returns Some of the aliases you requested do not exist with the page_story_id number, but when i'm querying the graph api for that story id i get the data..

any ideas why ?

Asaf Nevo
  • 11,338
  • 23
  • 79
  • 154

1 Answers1

0

As I answered my question asked here: Facebook Api v2.2 - get album's photos shares count

The right batch request should be:

[
 {
   "method":"GET",
  "name":"get-photos",
  "relative_url":"951337131548012?fields=photos.limit(250){likes.limit(1),comments.limit(1),id,source,page_story_id},likes.limit(1)"
  },
 {
  "method":"GET",
  "relative_url":"/?ids={result=get-photos:$.photos.data.*.page_story_id}&fields=shares"
 }
]
Community
  • 1
  • 1
Asaf Nevo
  • 11,338
  • 23
  • 79
  • 154