I used Facebook SDK to connect with Graph API (get here: https://www.nuget.org/packages/Facebook/) and when received access _token I make a test with the account has 689 friends and it worked as well, but when I switch to another account has more than 3000 friends, it was got an exception and not return anything.
I has been researching for it and someone recommended me to use GetTaskSync() method in FacebookClient class, but I don't understand how to use this function (searched but got nothing).
Please help me, thanks in advance !
This Stackoverflow question describes using bundles to tell Facebook what upper limit to use for number of friends.
Use the Bundle object, call putInt("limit", 5000), then execute a GraphRequest using executeAsync.
https://stackoverflow.com/a/33409920/154186
Related
I've been having trouble with this for a while and now I really need help.
This is the code I am currently using to bind a custom subdomain to Azure and everything is working just fine:
var appService = await azure.AppServices.WebApps.GetByIdAsync(
"subscription-id");
await appService.Update().DefineHostnameBinding()
.WithThirdPartyDomain("mydomain.net")
.WithSubDomain("www")
.WithDnsRecordType(CustomHostNameDnsRecordType.CName)
.Attach()
.ApplyAsync();
So what will be the way to bind just mydomain.net except that CustomHostNameDnsRecordType.CName should be changed with CustomHostNameDnsRecordType.A because Azure does not support CNAME records for root domains?
I cannot skip the WithSubDomain(string) method. Tried passing and null/empty string/space or just . but the response from Azure for null is Object reference not set to an instance and for the others is Bad Request.
P.S. I know that I am using an old SDK which is in maintenance mode but the new ones are still in beta or even alpha and there is still no support for App Services so I have to stick with that.
#DeepDave-MT pointed me to the correct answer in a comment under my question even though it's ridiculous. I am now quite sure I will go with this fluent API because there are too many things that are bothering me, almost no documentation, bad error handling and so on. Anyway, this is how to add a root domain in Azure using the so called fluent management API:
await appService.Update().DefineHostnameBinding()
.WithThirdPartyDomain("mydomain.net")
.WithSubDomain("#")
.WithDnsRecordType(CustomHostNameDnsRecordType.A)
.Attach()
.ApplyAsync();
P.S. I don't know why I don't have the habit to check for issues in GitHub.
I've been trying for days on this and think that the issue is somewhere with my developer account but thought I'd ask for advice here first before digging in there.
I have followed the documentation and multiple tutorials and this should work it seems but no matter what call I make using Tweetinvi to Twitter I get "Forbidden" which when looking at the twitter codes means my authorization is correct but that I am asking for something that I don't have access to, but I am just trying to send a test tweet to see if the program works, which according to Twitter's documentation I should have full access to. Here's the code that I took from Tweetinvi's Tutorial on how to make a "Hello World" tweet but it just doesn't work cuz it returns "Forbidden".
static async Task Main(string[] args)
{
var userClient = new TwitterClient("APIKey", "sAPIKey", "AccessToken", "sAccessToken");
var tweet = await userClient.Tweets.PublishTweetAsync("This is a test tweet");
Console.WriteLine(tweet);
}
It's not just the send tweet function either, if I try to pull any information at all it says it's forbidden so I feel the issue is on Twitter side not my code but I am just trying to learn it as a hobby and have no idea. Just was told Tweetinvi would make everything take 5 minutes and now I am at three days of trying to figure this out. Any help in figuring this out would be nice and greatly appreciated.
Twitter's latest API release [Nov 15th 2021] has an entry level of access called "Essential" that provides access to the v2 API, because this should be the base for most new apps. If you need access to v2 and also to the legacy v1.1 APIs in the same app, you will need "Elevated" access, which is also available for free. The PublishTweetAsync method you are calling in the code in this question is trying to hit the v1.1 Tweet statuses/update endpoint, so your app will need Elevated access in order to make it work.
I'd like to request help with the following problems:
Using: c#, Microsoft.Exchange.WebServices, ExchangeServer 2013 SP1
Is it possible to get id of GAL by the use of c# + Microsoft.Exchange.WebServices ?
The only possibility I have found is that I need to use "the Get-GlobalAddressList cmdlet https://technet.microsoft.com/en-us/library/aa996579(v=exchg.160).aspx in Exchange Management Shell.
I'd prefer to retrieve it via c#, but I cannot find any information regarding it.
Querying GAL - retrieving all the items. Making the research I found 2 ways - methods which are helpful:
a) service.ResolveName - works after some minor tweaks
b) service. FindPeople - not tested as I do not have id of GAL. Can someone tell me if this is better than "a" and provide maybe exmaple of use in c#
Are there any other ways to get all the items from GAL ? Any links for tutorials, articles or code examples?
If its OnPrem Exchange you can just query active directory directly using LDAP https://www.c-sharpcorner.com/article/accessing-global-address-list-via-system-directoryservices-n/ . You can't get the GAL's Id using the EWS managed API you can use the Offline address book https://gsexdev.blogspot.com/2013/06/ews-findpeople-workaround-for-reading.html. If its Office365 then the Graph API would be a better option.
I am making use of the EWS managed API and it used to work perfectly until one fine day the autodiscover url changed (Is it possible?).
The code is pretty straight forward:
service.Credentials = new NetworkCredential("email#contoso.com", userData.Password);
service.AutodiscoverUrl("email#contoso.com", RedirectionUrlValidationCallback);
The url which I am getting is as follows: https://contoso.com/EWS.Exchange.asmx (note the EWS.Exchange).
I have enabled the tracing and that url is also in the traces but I got stuck.
Anyone has any ideas to why this is happening? I tried to search but found nothing.
Oh yes, the exchange which I am using is exchange 2007.
Thanks!
My guess is there is a misconfiguration somewhere. You might start by checking your EWS settings on the Client Access Server: Get-WebServicesVirtualDirectory -Identity EWS(default web site)
So, what I did was start from the beginning.
I removed my current certificates and created new ones... and it worked!
I do not understand why but hopefully it will help others as well :).
I followed this tutorial: http://www.howtogeek.com/107415/it-how-to-create-a-self-signed-security-ssl-certificate-and-deploy-it-to-client-machines/
My website can post a note or a feed into Facebook and receive noteid or feedid.
And now, I need to update a note or feed but i don't know how to do that.
Please help me!!! (^~^)
A Quick Search Found the Notes API Documentation and led me right to Note Editing.
If you want edit note with Graph API, you need send POST request:
https://graph.facebook.com/{NOTE_ID} with both fields: subject and message.
If you send only with one param, another in note set as empty