MicrosoftContentModerator / samples-fbPageModeration

Connect a Facebook Page to Content Moderator
MIT License
3 stars 8 forks source link

FBListener #4

Open bernardofn opened 5 years ago

bernardofn commented 5 years ago

IN step g. 'Replace the contents of the run.csx with the contents from FbListener/run.csx.' when I run/compile the new function FBListener, I get this message.

2019-03-06T14:44:59 Welcome, you are now connected to log-streaming service. 2019-03-06T14:45:26.232 [Warning] run.csx(13,75): warning CS0618: 'TraceWriter' is obsolete: 'Will be removed in an upcoming version. Use Microsoft.Extensions.Logging.ILogger instead.' 2019-03-06T14:45:26.233 [Warning] run.csx(109,62): warning CS0618: 'TraceWriter' is obsolete: 'Will be removed in an upcoming version. Use Microsoft.Extensions.Logging.ILogger instead.' 2019-03-06T14:45:26.273 [Error] run.csx(19,26): error CS1061: 'HttpRequestMessage' does not contain a definition for 'GetQueryNameValuePairs' and no extension method 'GetQueryNameValuePairs' accepting a first argument of type 'HttpRequestMessage' could be found (are you missing a using directive or an assembly reference?) 2019-03-06T14:45:25.889 [Information] Script for function 'FBListener' changed. Reloading. 2019-03-06T14:45:26.395 [Error] run.csx(20,31): error CS1061: 'HttpRequestMessage' does not contain a definition for 'GetQueryNameValuePairs' and no extension method 'GetQueryNameValuePairs' accepting a first argument of type 'HttpRequestMessage' could be found (are you missing a using directive or an assembly reference?) 2019-03-06T14:45:26.457 [Error] run.csx(21,34): error CS1061: 'HttpRequestMessage' does not contain a definition for 'GetQueryNameValuePairs' and no extension method 'GetQueryNameValuePairs' accepting a first argument of type 'HttpRequestMessage' could be found (are you missing a using directive or an assembly reference?) 2019-03-06T14:45:26.503 [Warning] run.csx(67,13): warning CS0162: Unreachable code detected 2019-03-06T14:45:26.503 [Information] Compilation failed.

I think this is what is blocking the Facebook posts to go to the moderator.

bernardofn commented 5 years ago

After reviewing all the steps again with a new account, I still get an error when trying to run the FBListener function. When I try to connect it with the FB app, I get this in the logs

2019-03-07T14:22:35.899 [Information] Executing 'Functions.FBListener' (Reason='This function was programmatically called via the host APIs.', Id=2eeb080f-08dc-4203-891b-a8f0b55e14d6) 2019-03-07T14:22:36.559 [Error] Function compilation error Microsoft.CodeAnalysis.Scripting.CompilationErrorException : Script compilation failed. at async Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.CreateFunctionTarget(CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\DotNet\DotNetFunctionInvoker.cs : 314 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Description.FunctionLoader`1.GetFunctionTargetAsync[T](Int32 attemptCount) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\FunctionLoader.cs : 55 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.GetFunctionTargetAsync(Boolean isInvocation) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\DotNet\DotNetFunctionInvoker.cs : 183 2019-03-07T14:22:36.678 [Warning] run.csx(13,75): warning CS0618: 'TraceWriter' is obsolete: 'Will be removed in an upcoming version. Use Microsoft.Extensions.Logging.ILogger instead.' 2019-03-07T14:22:36.682 [Warning] run.csx(109,62): warning CS0618: 'TraceWriter' is obsolete: 'Will be removed in an upcoming version. Use Microsoft.Extensions.Logging.ILogger instead.' 2019-03-07T14:22:36.733 [Error] run.csx(19,26): error CS1061: 'HttpRequestMessage' does not contain a definition for 'GetQueryNameValuePairs' and no extension method 'GetQueryNameValuePairs' accepting a first argument of type 'HttpRequestMessage' could be found (are you missing a using directive or an assembly reference?) 2019-03-07T14:22:36.831 [Error] run.csx(20,31): error CS1061: 'HttpRequestMessage' does not contain a definition for 'GetQueryNameValuePairs' and no extension method 'GetQueryNameValuePairs' accepting a first argument of type 'HttpRequestMessage' could be found (are you missing a using directive or an assembly reference?) 2019-03-07T14:22:36.919 [Error] run.csx(21,34): error CS1061: 'HttpRequestMessage' does not contain a definition for 'GetQueryNameValuePairs' and no extension method 'GetQueryNameValuePairs' accepting a first argument of type 'HttpRequestMessage' could be found (are you missing a using directive or an assembly reference?) 2019-03-07T14:22:36.972 [Warning] run.csx(67,13): warning CS0162: Unreachable code detected 2019-03-07T14:22:37.033 [Error] Executed 'Functions.FBListener' (Failed, Id=2eeb080f-08dc-4203-891b-a8f0b55e14d6) Script compilation failed.