First off thank you very much for all your hard work on the Facebook C# SDK. It has made my life much easier.
I'm attempting to use the Facebook C# SDK to perform /items_batch calls to the Commerce Manager API.
My code looks like this:
FacebookClient facebookClient = new FacebookClient();
dynamic facebookClientResult;
dynamic parameters = new ExpandoObject();
parameters.access_token = "XXXXXX|YYYYYYY";
parameters.item_type = "DESTINATION";
// Simple object that serializes to a requests object as per: https://developers.facebook.com/docs/marketing-api/catalog-batch#supported-fields-destination
parameters.requests = JsonConvert.SerializeObject(itemsBatchPolicy.ItemsBatchModel);
facebookClientResult = facebookClient.Post($"/{itemsBatchPolicy.ApiVersion}/{itemsBatchPolicy.CatalogId}/items_batch", parameters);
No matter how I tweak my parameters the exception message coming back is always the same:
Facebook.FacebookApiException
HResult=0x80131500
Message=(GraphMethodException - #100) Unsupported post request.
Object with ID 'XXXXXXX' does not exist, cannot be loaded due to missing permissions, or does not support this operation.
Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api
Source=Facebook
StackTrace:
at Facebook.FacebookClient.ProcessResponse(HttpHelper httpHelper, String responseString, Type resultType, Boolean containsEtag, IList`1 batchEtags)
at Facebook.FacebookClient.Api(HttpMethod httpMethod, String path, Object parameters, Type resultType)
at Facebook.FacebookClient.Post(String path, Object parameters)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at [My code]...
Might anyone have some insight as to how to address this error?
Thank you very much, vic
User contributions licensed under CC BY-SA 3.0