I have created a managed source for the Facebook page Redbull. Now I want to update the source as described in http://dev.datasift.com/docs/api/1/sourceupdate to add a second page for CocaCola. But I always get error code 409 (Conflict) with an error message (see below).
Is it possible to fetch two Facebook pages in one source with only one Access token? What I’m doing wrong?
Details:
SOURCE-GET-REQUEST:
> curl -X POST https://api.datasift.com/v1/source/get -H 'Authorization: ..."
OUTPUT:
{
count: 1,
page: 1,
pages: 1,
per_page: 20,
sources: [
{
name: "seppl",
status: "running",
parameters: { comments: false, likes: false, posts_by_others: false },
resources: [
{
resource_id: "b6453e04cb774d1eb8b727f197a9b9e8",
source_id: "fa1478e866204c38acf85dc3144e6740",
status: "valid",
parameters: {
url: "http://www.facebook.com/redbull",
title: "Red Bull",
id: "14226545351"
}
}
],
created_at: 1391159444,
id: "fa1478e866204c38acf85dc3144e6740",
source_type: "facebook_page",
auth: [
{
identity_id: "68154e543e524bc9baddbc1e489da9cc",
source_id: "fa1478e866204c38acf85dc3144e6740",
status: "valid",
parameters: { value: "MyFacebookAppToken" },
expires_at: 0
}
]
}
]
}
UPDATE-REQUEST:
curl https://api.datasift.com/v1/source/update \
-d ‘id=133376753537407|WQRKTCRheIvSNCQvff97Xl0lMUM’
-d ‘source_type=facebook_page’
-d ‘name=seppl’ \d
-d 'resources= ENCODED AS JSON:
[{“parameters”:{“url”:“http://www.facebook.com/redbull",“title”:"Red Bull”,“id”:“14226545351”}},
// <- old Page, already created
{"parameters":{"url":"http://www.facebook.com/coca-cola","title":"Coca-Cola","id":"40796308305"}}]
// <- new Page that I want to add
- d ‘auth= ENCODED AS JSON:
[{“parameters”:{“value”:“MyFacebookAppToken”}}]’ \ // <- the same AppToken for both pages?
-H 'Authorization: …"
OUTPUT:
HTTP/1.1 409 Conflict
A source with the same auth token already exists, or the same resource has been added more than once to this source
Authorization: ...