I'm trying to use the Graph SDK and NuGet 5.0.0-preview16 and forwarding the example it says to use Request method in example
var users = await graphClient.Users.Request().GetAsync();
but I have an error in the code:
'UsersRequestBuilder' does not contain a definition for 'Request' and
no accessible extension method 'Request' accepting a first argument of
type 'UsersRequestBuilder' could be found (are you missing a using
directive or an assembly reference?
Since C# SDK V5 Request method is removed and you can call directly GetAsync method. But V5 is still in preview and it's better to use latest V4 version.
var users = await graphClient.Users.GetAsync();
Upgrade guide can be found here.
Fixed: I changed Microsoft.Graph on NuGet from 5.0.0-preview16 to 4.47.0
Related
I'm developing a twilio function on a subaccount that needs to acces a twilio client on the main account. The function is being deployed through a Github action to the subaccount.
For this, on the subaccount function I have:
const mainClient = new twilio(context.MAIN_TWILIO_ACCOUNT_SID, context.MAIN_TWILIO_AUTH_TOKEN);
Then I need to access serverless.services but I'm getting serverless undefined therefore can't access services.
i.e.
return mainClient.serverless.services(...
I tested code locally and it worked but failed on deployment. Is it possible to access services on main account from a subaccount function??
Thanks.
For anyone experiencing a similar issue.
My problem was that deploying without being explicit about dependencies doesnt install the latests version of dependencies.
Deploy through github installed twilio node sdk version 3.29.0 but this version doesn includes serverless api yet. So I explicitly added latest twilio node sdk (3.75.0 at the moment) and that fixed the problem.
Thanks.
I want to access a facebook page data, and my fb Graph API version is 3.1, when i am writting this(in python):
graph = facebook.GraphAPI(access_token=token, version = 3.1)
it gives a version error, i.e:
facebook.GraphAPIError: Valid API versions are '2.7', '2.8', '2.9', '2.10', '2.11', '2.12', '3.0'
how can i access facebook Graph API through my version in python.
Thanks in advance.
You will either
have to use an app id that still allows you to use a lower API version, or
wait for an update of the library, or
see where the library does this check and manually add 3.1 to the list there.
If you are using this library https://github.com/mobolic/facebook-sdk/, you can edit the __init__.py file, which currently contains the following line:
VALID_API_VERSIONS = ["2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "3.0"]
If you add "3.1" to that list, you should be able to use API version 3.1 without getting this error.
When writing something like this in WebStorm:
let webWorker = new Worker('...')
...
webWorker.postMessage(...)
The postMessage is striked out with the following message:
"Deprecated symbol used, consult docs for better alternative"
"Checks for using deprecated JavaScript functions and variables ..."
Is postMessage function of the webWorker is deprecated?
This method is annotated with #deprecated tag in lib.dom.d.ts provided by Microsoft (that, in turn, was auto-generated from the webidl definition of edge); Microsoft has recently fixed the issue in https://github.com/Microsoft/TypeScript/pull/24669, method is no more marked deprecated in https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts.
Webstorm will bundle Typescript 3.x that includes the fix in upcoming 2018.2.1 update (https://youtrack.jetbrains.com/issue/WEB-34144)
Currently using RestSharp V106.1.0 as well a v2.1.8
While attempting to integrate docusign with our application I received an error off of the loginAPI:
string accountId = loginApi(username, password, integratorKey);
Receiving this error
{"Method not found: 'RestSharp.IRestRequest RestSharp.RestRequest.AddFile(System.String, System.Action`1, System.String, System.String)'."}
I have verified all of the parameters have the correct value and I was able to recreate a working API usage in a brand new project without prior packages installed. This leads me to think it is the version of RestSharp that is giving me this issue.Based on research about others having this issue it was an issue of the library change within updates.
Is there a specific version that is required as the dependancies for Docusign Package in visual studio doesn't mention a Restsharp version requirement?
Thank you in advance.
I'm trying to return JArray object from Azure Function of HttpTrigger type:
JArray a = JArray.Parse("[{\"reportId\": \"1111\",\"reportName\": \"AAAA\"}]");
return req.CreateResponse(HttpStatusCode.OK, a);
However, for some reason, the response body returned as:
[{"reportId":[],"reportName":[]}]
What am I doing wrong?
I can repro the issue with Newtonsoft.Json version 10+. If downgrade is possible, please have a try to use Newtonsoft.Json version 9.0.1. Then it works correctly on my side. We also could rasie an issue to Azure function team.
Azure Functions requires that you use Newtonsoft.Json version 9.0.1, as we don't support binding redirects. Your code is running in the same process as the Functions host, which means you have the same binding redirects.
We're improving the Visual Studio experience so that it's clear that there's a strict upper bound on the dependency.