I'm trying to make sanitation based on the results of a Facebook call, but Coldfusion tells me that the variable is null:
FILECONTENT null <br>The error occurred on line 66.
Here is the line causing the error:
<cfif isDefined("storeFeedJSON.fileContent")>
<cfset storeFeedJSON.fileContent = process.CleanBadUnicode("#storeFeedJSON.fileContent#")>
</cfif>
The line is clearly not null, as I wrapped it in "isDefined", and when I dump storeFeedJSON, I see that fileContent looks like
{"data":[]}
JSON is empty, but still not null ...
EDIT: Here is the call that I forgot to put 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 will probably look 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>
Please note that this will not lead to a valid response from Facebook, as I changed my token and some other parameters.