Facebook integration using C # and asp.net core

I am starting a project that will be closely linked to Facebook. I am going to use React in the interface and it will talk to REST ws made using asp.net core web api.

The idea is that in this API I will call on Facebook. Basically, I want to: log in, receive / publish messages from Messenger, receive / publish comments and messages from a business page.

I searched Google a bit and did not find many resources or examples of how to do this integration other than the Facebook documentation, which has many things, and I don’t know very well where to look.

I also found this .NET SDK, but it is a bit dated https://github.com/facebook-csharp-sdk/facebook-csharp-sdk and

So my question is: is reading documentation really the best solution?

If anyone could at least give me a hint where to go, I would be very grateful. Would it be better / easier to integrate with Facebook with a different stack than C # / asp.net?

Also, if there is any other API, SDK, or something already built into .NET that helps with this, I would be grateful.

Thanks in advance.

+5
source share
4 answers

Facebook SDK for C # works fine for standard .NET

https://hackerapp.com/net/

https://github.com/facebook-csharp-sdk/facebook-csharp-sdk

As for .NET Core, I think you're out of luck so far. If you do not want to directly port it to .NET Core.

+5
source

I am one of the .net developers working with the Facebook API for over 5 years, and we tried to use the "Facebook SDK for C #". He has more problems than good. As a result, we get our own Facebook API client. Basically this is just the "RestSharp HTTP library", "Newtonsoft.Json" for serialization / deserialization and a couple of common functions where you provide the Facebook API endpoint and indicate which class you expect as a general parameter.

var accounts = client.Get<Accounts>("me/accounts"); var createResponse = client.Post<CreateResponse>("123456779/feed", postToCreate); 
+4
source

Automated customer service at FB is not uncommon, but code is hard to find. I assume that you have installed the application domain and received its verification and FB approval.

I tried installing a chatbot with both python and .NET, and I have to say that python Api is much more complete, faster and less buggy than C #. But, as far as I know, only PyApi has integrated reactions (I have not tried them).

Therefore, you will need to do this manually using Facebook Api, by sending a direct GET / POST request initiated by your ASP.NET, or using some kind of cross-language platform like IronPython to solve the problem (which basically collect the call, add the key and secret, and CURL-it).

As a concluding remark (not very motivating) there is documentation for the messages, but not for the message, as you can see here (messages) and here (messenger) .

+1
source

You can perform most of the client side facebook operations using their javascript SDK.

https://developers.facebook.com/docs/javascript

As for speeding up server-side outgoing API calls from .NET, you can check the api explorer GUI. This may be useful for detection.

https://developers.facebook.com/tools/explorer/

0
source

All Articles