How to update note on Facebook using Facebook C# SDK - c#

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

Related

Microsoft Graph Client SDK vs. Requesting JSONs

I know that the query:
https://graph.microsoft.com/v1.0/me/messages
Corresponds to:
GraphClient.Me.Messages.Request().GetAsync()
I am trying to replicate the following requests in Microsoft Graph Client SDK :
Get All Categories
https://graph.microsoft.com/beta/me/outlook/masterCategories
Corresponding Graph client query: ??
Get All messages that contain certain words in their subject
The link will be similar to this
https://graph.microsoft.com/v1.0/me/messages?$search="hello world"
Corresponding Graph Client : ??
Update each of these messages with a category
?
The documentation only gives 2 examples, where could i find a list of examples/reading material on this?
The SDK is generated for the production endpoint (v1.0), so you will have to make a custom request for beta APIs
List<QueryOption> options = new List<QueryOption>
{
new QueryOption("$search", "hello world")
};
var filteredMessages = await
graphClient.Me.Messages.Request(options).GetAsync();
This also requires using custom requests since this is beta functionality.
We appreciate your feedback about our docs and how to use the SDK. We have some additional reference in the repo and are continuing to examine options for improving our SDK docs.
Since I don't have enough reputation points, I had to post an answer instead of a comment.
Thanks user8608110 for your help. Unfortunately, I can't use graph explorer because I'm not an admin. I think I have my patch request setup correctly, but I keep getting an "Empty Payload" error.
I thought stackoverflow was for us to help each other not delete the post of people trying to get help.

C# - Facebook SDK time out when get friend more than 1000

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

How to get Facebook public data (public posts) only in english language?

currently I am working on an app and I need to get Facebook public post data, as Facebook give access to its public data through Graph API. I can access them through Facebook API in C#. But the problem is, when I retrieve this public data, it give me only in German language posts (may be because I am in Germany). But I wanted to access the comments in English language or other countries then how it can be possible?
Any suggestion or guidance will be highly appreciated.
I'm going to take a guess that they are simply respecting the Accept-Language header you send them. Add a header to your request setting "Accept-Language" to "en-US" and you should get back US English results.
EDIT: correction... looking at the docs (https://developers.facebook.com/docs/opengraph/guides/internationalization/) you need to add a "locale" querystring to the URL you request from them. The example given is "https://graph.facebook.com/645752348782873?access_token=$APPID|$APPSECRET&locale=en_US"

Integration of Ogone payments with alias support

I have problems with Ogone Payment provider.
My task is to integrate this payment method, but with alias support, not with credit card number support.
I have searched several times for samples and solutions, also in the Ogone support documentation, but withoud success.
Example1Example2Example3
My question is: Is there a webservice or open web api for making request to Ogone? Did anyone have found samples for this provider writen in C#?
I have found answert of my question.
There are the steps for simple Ogone Payment.
Download Ogone Direct Link Guide from here.
Download Ogone Alias Manager Integration Guide from here.
Try to read them, because all of the info are inside of them.
Find the URL to make request to. Ex: https://secure.ogone.com/ncol/test/orderstandard.asp
Post data to the url like in this example.
The data should include several important components and must be similar to this:
"PSPID=username&
ALIASUSAGE=Test&
ORDERID=OrderId&
AMOUNT=Price*10&
CURRENCY=EUR&
ALIAS=GUID&
LANGUAGE=en_EN&
ACCEPTURL=SomeUrl&
EXCEPTIONURL=SomeUrl&
DECLINEURL=SomeUrl&
SHASIGN=SHA1EncriptedPhrase"
The SHASIGN is encripted passphrase that is taken from the OgoneBackoffice.
If response successd, then you should recieve an Html page.
Put the reponse into an IFRAME or where you want. This is the page for payment.
If there are some issues, please read the Direct Link Guide for them.
After successful payment the user will be redirected to the links in the request.
For More question, please comment.

How to use Yahoo REST Api in C#

I'm just trying to make an yahoo boot that send to registered user of my application an instant message. I've spent some hours searching the web on how to do it but yahoo developer documentation sucks.First of all I don't know what servers I should use for authorization, log in, and messaging. I have a consumer key and I've tried to follow this steps but nothing works.
Any advice/suggestion is welcome.
The documentation looks to be very good, I think the issue here is that your knowledge of how REST API's work in general is a bit lacking.
Let's talk about diagram #2: Get a request token using: get_request_token.
get_request_token is part of an HTTP endpoint, and in their diagram they want you to pass in a handful of parameters to validate your request.
oauth_consumer_key
oauth_nonce
oauth_signature_method
etc
(If you need more clarification of any step you can find it in the tree view on the left hand side of the page)
The request URL:
https://api.login.yahoo.com/oauth/v2/get_request_token.
Now at this point you can either use the HTTP GET or POST verb. If you decide to use GET you will need to include those above parameters as a query string.
?oath_consumer_key=myConsumerKey&oauth_nonce=oathNonce etc
I will leave it to you to write the associated C# code. You'll want to start off with the HttpWebRequest.Create() method

Categories