Managed Source And Over Publishing


#1

I am testing an Instagram AND query through the push API. Behind the query are three Instagram managed sources (one per hashtag). The query has a single tag for the result. This query is pushed to my test server via the push API. I have found that we get one datasift interaction per managed source for the one query. Thus, instead of getting one interaction, we get three.

You will note in the JSON data I’ve provided below that the instagram id (which I think uniquely identifies the post) is 491435113094710727_413702688 for all three messages. You will also note that the datasift interaction tag is “37996:10065523354” for all three blocks. However, the actual interaction ids are different for each message. This leads me to think that I’m getting one interaction message per managed source.

My query is:

tag “37996:10065523354” { interaction.content contains “bbmd_11” and interaction.content contains “bbmd_12” and interaction.content contains “bbmd_13” }

return {
interaction.content contains “bbmd_11” and interaction.content contains “bbmd_12” and interaction.content contains “bbmd_13” and interaction.type == “instagram”
}

Upon posting one picture to instagram with all three hashtags, I get the following data from datasift in a short timespan:

{“instagram”:{“tags”:[“bbmd_12”,“bbmd_13”,“bbmd_11”],“id”:“491435113094710727_413702688”,“link”:“http://instagram.com/p/bR7aGyKgXH/",“images”:{“thumbnail”:{“height”:150,“width”:150,“url”:“http://distilleryimage11.s3.amazonaws.com/a7fcdbf2e36511e29e7122000aaa0fd8_5.jpg”},“low_resolution”:{“height”:306,“width”:306,“url”:“http://distilleryimage11.s3.amazonaws.com/a7fcdbf2e36511e29e7122000aaa0fd8_6.jpg”},“standard_resolution”:{“height”:612,“width”:612,“url”:“http://distilleryimage11.s3.amazonaws.com/a7fcdbf2e36511e29e7122000aaa0fd8_7.jpg”}},“caption”:{“id”:“491435374139802972”,“text”:"#bbmd_11 #bbmd_12 #bbmd_13”,“from”:{“id”:“413702688”,“username”:“gaur_ashu”,“profile_picture”:“http://images.ak.instagram.com/profiles/anonymousUser.jpg",“full_name”:"Sudhanshu Gaur”},“created_time”:“1372803683”},“from”:{“id”:“413702688”,“username”:“gaur_ashu”,“profile_picture”:“http://images.ak.instagram.com/profiles/anonymousUser.jpg",“bio”:"",“website”:"",“full_name”:"Sudhanshu Gaur”},“type”:“image”,“created_time”:“1372803652”,“filter”:“Normal”},“source”:{“id”:“8825d1353ed6423db9ffe88559334f8a”},“interaction”:{“id”:“1e2e365a7be3aa00e019000072d16d0c”,“content”:"#bbmd_11 #bbmd_12 #bbmd_13",“tags”:[“37996:10065523354”],“author”:{“id”:“413702688”,“link”:“http://instagram.com/gaur_ashu",“name”:“gaur_ashu”,“avatar”:“http://images.ak.instagram.com/profiles/anonymousUser.jpg”},“created_at”:"Tue, 02 Jul 2013 23:21:45 0100”,“type”:“instagram”},“language”:{“tag”:“en”,“confidence”:100}}

{“instagram”:{“tags”:[“bbmd_12”,“bbmd_13”,“bbmd_11”],“id”:“491435113094710727_413702688”,“link”:“http://instagram.com/p/bR7aGyKgXH/",“images”:{“thumbnail”:{“height”:150,“width”:150,“url”:“http://distilleryimage11.s3.amazonaws.com/a7fcdbf2e36511e29e7122000aaa0fd8_5.jpg”},“low_resolution”:{“height”:306,“width”:306,“url”:“http://distilleryimage11.s3.amazonaws.com/a7fcdbf2e36511e29e7122000aaa0fd8_6.jpg”},“standard_resolution”:{“height”:612,“width”:612,“url”:“http://distilleryimage11.s3.amazonaws.com/a7fcdbf2e36511e29e7122000aaa0fd8_7.jpg”}},“caption”:{“id”:“491435374139802972”,“text”:"#bbmd_11 #bbmd_12 #bbmd_13”,“from”:{“id”:“413702688”,“username”:“gaur_ashu”,“profile_picture”:“http://images.ak.instagram.com/profiles/anonymousUser.jpg",“full_name”:"Sudhanshu Gaur”},“created_time”:“1372803683”},“from”:{“id”:“413702688”,“username”:“gaur_ashu”,“profile_picture”:“http://images.ak.instagram.com/profiles/anonymousUser.jpg",“bio”:"",“website”:"",“full_name”:"Sudhanshu Gaur”},“type”:“image”,“created_time”:“1372803652”,“filter”:“Normal”},“source”:{“id”:“0ae1f77072a74b01ab0105ef86b38f52”},“interaction”:{“id”:“1e2e365a7be3aa00e019ffffafa8fcae”,“content”:"#bbmd_11 #bbmd_12 #bbmd_13",“tags”:[“37996:10065523354”],“author”:{“id”:“413702688”,“link”:“http://instagram.com/gaur_ashu",“name”:“gaur_ashu”,“avatar”:“http://images.ak.instagram.com/profiles/anonymousUser.jpg”},“created_at”:"Tue, 02 Jul 2013 23:22:50 0100”,“type”:“instagram”},“language”:{“tag”:“en”,“confidence”:100}}

{“instagram”:{“tags”:[“bbmd_12”,“bbmd_13”,“bbmd_11”],“id”:“491435113094710727_413702688”,“link”:“http://instagram.com/p/bR7aGyKgXH/",“images”:{“thumbnail”:{“height”:150,“width”:150,“url”:“http://distilleryimage11.s3.amazonaws.com/a7fcdbf2e36511e29e7122000aaa0fd8_5.jpg”},“low_resolution”:{“height”:306,“width”:306,“url”:“http://distilleryimage11.s3.amazonaws.com/a7fcdbf2e36511e29e7122000aaa0fd8_6.jpg”},“standard_resolution”:{“height”:612,“width”:612,“url”:“http://distilleryimage11.s3.amazonaws.com/a7fcdbf2e36511e29e7122000aaa0fd8_7.jpg”}},“caption”:{“id”:“491435374139802972”,“text”:"#bbmd_11 #bbmd_12 #bbmd_13”,“from”:{“id”:“413702688”,“username”:“gaur_ashu”,“profile_picture”:“http://images.ak.instagram.com/profiles/anonymousUser.jpg",“full_name”:"Sudhanshu Gaur”},“created_time”:“1372803683”},“from”:{“id”:“413702688”,“username”:“gaur_ashu”,“profile_picture”:“http://images.ak.instagram.com/profiles/anonymousUser.jpg",“bio”:"",“website”:"",“full_name”:"Sudhanshu Gaur”},“type”:“image”,“created_time”:“1372803652”,“filter”:“Normal”},“source”:{“id”:“4f23fadf0917491d98a76f97cc904750”},“interaction”:{“id”:“1e2e365a7be3aa00e0190000370268a8”,“content”:"#bbmd_11 #bbmd_12 #bbmd_13",“tags”:[“37996:10065523354”],“author”:{“id”:“413702688”,“link”:“http://instagram.com/gaur_ashu",“name”:“gaur_ashu”,“avatar”:“http://images.ak.instagram.com/profiles/anonymousUser.jpg”},“created_at”:"Tue, 02 Jul 2013 23:23:49 0100”,“type”:“instagram”},“language”:{“tag”:“en”,“confidence”:100}}


#2

We're running some tests and looking into this.


#3

It looks like this is down to a combination of your testing/implementation of the Instagram source, and expected behaviour.

You set up three different Instagram Managed Sources - each Managed Source is independent of the others, so has no knowledge of what the others are filtering for, or what interactions they return. 

In your tests, you tagged each image with three tags - each of your three Instagram Sources correctly matched one of these tags, and returned an interaction. If you had only received these posts once each, rather than three times, that would mean that two of your Instagram Sources had not matched the posts. If you are looking for any Instagram post tagged with one of these three #tags, you could include the three tags in one Instagram Source - This would ensure that each post is only returned once.

An example

In my application, I allow my customers to set up their own Managed Sources. Two customers create Instagram Sources which turn out to be very similar:

  • Customer 1: Looking for tags - #Starbucks, #coffee
  • Customer 2: Looking for tags - #Peets, #coffee

If someone were to share an Instagram of the "#coffee they were drinking at #Starbucks", it would be picked up by each of my customer's Instagram Sources. I will receive an interaction from each Managed Source, each tagged with the source.id of the Managed Source that matched them, so I would know which customer filter returned that interaction.