I'm trying to do some sanitation on the results of a call to Facebook but Coldfusion is telling me that the variable is null:
FILECONTENT null <br>The error occurred on line 66.
Here's the line that causes the error:
<cfif isDefined("storeFeedJSON.fileContent")>
<cfset storeFeedJSON.fileContent = process.CleanBadUnicode("#storeFeedJSON.fileContent#")>
</cfif>
The struct is clearly not null however as I have it wrapped in an "isDefined" and when I dump storeFeedJSON I can see fileContent looks like
{"data":[]}
Empty JSON but still not null...
EDIT: Here's the call I forgot to put in there:
<cfset fbURL = "https://graph.facebook.com/#qStoreFBPages.pageID#/#fbEdge#?fields=#fbFields#&since=#fbSinceTime#&#qToken.objectValue#">
<cfhttp result="storeFeedJSON" url="#fbURL#" method="get"></cfhttp>
which would probably end up looking something like this:
<cfhttp result="storeFeedJSON" url="https://graph.facebook.com/1749383765/posts?fields=created_time&since=1389296713&access_token=CAAH6oehQqUUU2IALvt0ZB3mdE6E2LCaldFc1TjIqxALUZBMqZC01O2hQXkOX8ROI9QBHn7WjWrHHneazAP4gWbj0MBsRUlel9TAG52kjBm0bBOUHVEFmEusEUHfhznlqzH1GMgCpCU4z4SmgXU8oFZBPDyAv1ByJu167jgkVd6UROWtDZBNBCP&expires=5184000" method="get"></cfhttp>
Note that will not result in a valid response from Facebook as I've changed my token and some other params.