Facebook MS - source/update/ endpoint question


#1

When adding new resources to a Facebook pages source, you add additional resources as below.

(From a sample within this forum)

“parameters”: {
“url”: “http://www.facebook.com/therollingstones”,
“title”: “The Rolling Stones”,
“id”: 8305888286
}

Is it possible to just create new resources with params that just contain the page id or must the url and title be pre fetched and entered as well? (Is the URL and title validated in anyway - must they match the actual page ref of the id?)


#2

You don’t need to include the title and URL; the ID is all we need. If you are just looking to add resources to an existing source, you might be interested in using the /source/resource/add API endpoint rather than /source/update. This endpoint allows you to just provide the new resources you want to add to the source, rather than requiring you to pass in all existing resources in order to preserve them.


#3

Perfect!

I missed that endpoint somehow.
That will certainly do the trick.

With the validation flag, what does that actually do?
Does it perform a page lookup on the U.S. To confirm that page exists and is visible within the scope of tokens used for the source? Or is it simpler/more complicated and time consuming then that?

Jason


#4

If you do not switch validation off using validate=false we will make a call to the third party API (Facebook, Instagram, etc) to validate that your auth tokens and resources are valid. I believe this will include checking to ensure that the tokens you supplied can read data from the resources you wish to monitor. If you provide 100 resources, we will need to check all 100 of those resources against the API, so this can be time consuming, and can lead to API timeouts (thus the introduction of the validate param)