Facebook Graph API - Field attachments specified more than once. This is only possible before version 2.1 - facebook-graph-api

I'm using the FB Graph API explorer and version 11.0 I've added the page id, feed and fields. Previously we were using 'link' and 'title' but according to the docs here those are deprecated and these are the new field names:
attachments{unshimmed_url}
attachments{title}
but when I add this to the FB Graph API Explorer I either get the error:
Field attachments specified more than once. This is only possible
before version 2.1
or I only get the first mentioned attachments field (attachments{unshimmed_url})
1234567/feed?fields=attachments{unshimmed_url}&attachments{title}

Can’t reproduce this error right now, using v11.0, but it should work if you just list the sub-fields comma separated:
…/feed?fields=attachments{unshimmed_url,title}
https://developers.facebook.com/docs/graph-api/advanced#fieldexpansion
Edit: Can reproduce, with the “correct” incorrect syntax.
feed?fields=attachments{unshimmed_url},attachments{title} throws this error; you had feed?fields=attachments{unshimmed_url}&attachments{title} in your post, which is a different thing - that’s one URL parameter named fields, and then one named attachments{title}

Related

How to get all the versions of a particular FHIR resource in AWS FHIR store?

Is there a way to get the list of all the versions of a specific resource created in FHIR store. I have used the following call,
<FHIR_URL>/<resource-type>/<resource-id>/_history
but its not returning response
If I add version to this url:
<FHIR_URL>/<resource-type>/<resource-id>/_history/<version>
then it only shows that particular version of the resource, but all the versions of a specific resource are required, is there a way to get this?
When in doubt, I always try the reference-implementations.
(all GET requests below)
http://wildfhir4.aegis.net/fhir4-0-1/Patient/example/_history
https://vonk.fire.ly/R4/Patient/pat1/_history
http://hapi.fhir.org/baseR4/Patient/616330/_history?_count=50
I got each systems Patient-Fhir-Logical-Id ("example", "pat1", "616330") by using the search function, and picking a random Patient. The Search function is as simple as /Patient/? and no query string values.
While always subject to change and "re doing the seed data", the aegis example above (today) is returning multiple rows of history for a single patient.
If AWS does not work "mostly the same" as the 3 reference implementations, I would submit a bug report.
But based on your examples, it seems to fall in line with the reference implementation examples above and the HL7 documentation below.
https://build.fhir.org/http.html#history

Facebook graph api started to return only the first 10 posts in a group feed

a few days ago I started to experience troubles accessing facebook group data feed using graph api (i am using v2.8 but the results are the same also with older versions).
The graph api call started to return only the first 10 posts in the feed (i.e. the most recent ones) even though no changes were made from my side.
The same behaviour is reproducible also in graph api explorer using /groupId/feed path (I am not passing the 'limit' parameter in the request url). Previously it has been returning all the available posts with paging, etc.
Please note that if I use a pageId instead of groupId all the posts in the specified page are returned correctly - seems only groups are affected.
Can somebody shed some light on this?
Regards
Due to this thread in Facebook Developer Community it looks like a bug.
Here are bug reports:
https://developers.facebook.com/bugs/1316646108368355?hc_location=ufi
https://developers.facebook.com/bugs/1796973007211974?hc_location=ufi
https://developers.facebook.com/bugs/1645827285730392?hc_location=ufi

Howto add Modifiers to Graph API V2.0

I'm trying to use Facebook GraphAPI 2.0 to fetch user's id, first_name, and the url of profile picture(with special size modifiers) with single request. Here are my attempts:
If simply ask for picture, we can use: "me/picture?redirect=0&height=200&type=square&width=200" ==>It's successful.
If ask batch of information without special requirement of picture, we use: "me?fields=id,picture,first_name" ==> It's also successful.
Now, combining the two together, I tried: "me?fields=id,first_name,picture.fields(redirect(0), type(square),width(100))" as instructed by https://developers.facebook.com/docs/graph-api/using-graph-api/v2.0#reading (the paragraph of "Making Nested Requests"). It returns error...
Thanks for any advice. you can use GraphAPI Explorer to check: https://developers.facebook.com/tools/explorer/?method=GET&path=me%3Ffields%3Did%2Cname&version=v2.0
You don't need the redirect parameter if you also query for other fields:
GET /me?fields=id,first_name,picture.type(square).width(200).height(200)
should do. Note that the format (max. witdth/height) is determined by the largest edge. For my profile pic for example the width/height was 140 when requesting 200 like above.

Getting error while reading salesforce custom field type Rich Textarea

I am using salesforce.cfc (downloded from Riaforge) to integrate coldfusion with salesforce.
<cfset latestProductList = salesforce.queryObject("SELECT Id, Name, Description__c, Price__c, ProductImage__c FROM Product__c") />
I have created one custom object named "Product__c". This object have one custom field "ProductImage__c" type "Rich TextArea". When i an trying to get product without this custom field it is run, but when i am trying to get product with this field i am getting below error:
"INVALID_FIELD: Name, Description__c, Price__c, ProductImage__c FROM Product__c ^ ERROR at Row:1:Column:44 No such column 'ProductImage__c' on entity 'Product__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. "
But i have this field. attached screen image of salesforce below.
Thanks,
Arun
A quick look at Salesforce CFC shows that it hasn't been updated in a while. The file SalesForce.cfc is pointing at:
https://www.salesforce.com/services/Soap/u/11.1
That's version 11.1 of the API, which is quite old and is long before rich text fields came into existence.
You might be able to fix this issue by simply updating the reference in SalesForce.cfc to the latest version of the API by changing
https://www.salesforce.com/services/Soap/u/11.1
to
https://www.salesforce.com/services/Soap/u/28.0
in that file, although there's a pretty good likelihood that that will break something else, since version 28.0 will have lots of new stuff that SalesForce.cfc is not coded to handle.
In any case, your problem is in fact the API version that you're using. In cases like this, when a field type did not exist as of a certain API version, then that field is invisible for that version. In your case, your rich text field is invisible for your API version, 11.1.

SharePoint Web Services - Updating ContentType field Required property?

I've been trying to programmatically reproduce the behavior of editing a Content Type's field properties in the SharePoint site management screen and selecting the "Required" radio button with no sucess using the WSS 3.0 web service's Webs.asmx "UpdateContentType" method.
The first difficulty was the issue with the MSDN documentation that said fields should be of a FieldRef type when in fact they need to be of a Field type (reference). Adding fields and deleting fields works fine after the fix, but updating fields seems to not function at all. (It should also be noted that I followed the recommendation on the previous link to use Method="2" for updating fields but it changes nothing, and using Method values other than 1 for adding or other than 3 for deleting also function correctly).
Here's the web service call (slightly modified with strings instead of XmlNode objects for readability):
SharePointWebServices.Webs webService = new SharePointWebServices.Webs();
webService.Url = "http://mysharepointserver/site";
webService.UseDefaultCredentials = true;
webService.UpdateContentType(
#"0x01005A089D9EC8A382458FB1F6C72096D52A",
#"<ContentType />",
#"<Fields />",
#"<Fields><Method ID=""1""><Field Name=""SomeField"" ID=""{8a4803c4-6545-4a7a-804d-237eebff0ce3}"" Required=""TRUE"" Hidden=""FALSE"" ReadOnly=""FALSE"" PITarget="""" PIAttribute="""" PrimaryPIAttribute="""" Aggregation="""" Node="""" /></Method></Fields>",
#"<Fields />");
After the call, the field is still Required="FALSE".
A quick look into the stssoap.dll assembly indicates that the "Required" property is apparently ignored during the update process. Is this normal behavior? If so, what is the recommended method for programmatically changing the "Required" field from client code (not executing on the SharePoint server)?
Any help would be greatly appreciated.
I've investigated this and found the same thing. I also tried adding the attribute Cmd="Update" to the Method element without success. This example of how to use UpdateContentType was helpful too.
I don't believe you will be able to do this with the out-of-the-box SharePoint services. You've verified from looking at stssoap.dll that this doesn't appear to work correctly. Another 'client'-style option is to use RPC methods but none appear to provide functionality for content types at all.
The web services are particularly frustrating because this type of not-so-edge case regularly comes up. It is very rare that I consider using them because of the time wasting involved with their limitations.
Do you have any option of deploying custom code to the server? You could develop this functionality using the object model and wrap it in your own custom web service (there is a walkthrough here) quite easily.
Here is an example adapted from Gabe Wishnie that does what you require:
SPContentType myContentType = myWeb.ContentTypes["myContentType"];
string internalName = myContentType.Fields["fieldToUpdate"].InternalName;
myContentType.FieldLinks[internalName].Required = false;
myContentType.Update(true);
Sorry this isn't more helpful but it's a common story when using the WSS 3.0 / SharePoint 2007 web services.