4

I would like to create a simple WPF in C#, which can authentic the user of a Facebook page, and later it will allow you to post to Facebook as that page to that pages wall.

I've looked online, but a lot of solutions are now outdated and the most popular Facebook C# library website is dead.

What I've tried

I've downloaded the C# Facebook SDK, which has over 7M downloads, their site is however dead and the documentation very old.

The first step I need to solve is building a "Manual Login Flow". I believe the SDK has this solution already developed, does anyone know how to properly use the SDK to create a manual login flow?

EDIT

I've now worked out how to do it, I avoided using the C-Sharp SDK completely, in the end it didn't take to long to code from scratch. This article helped me out greatly, along with this github I found. The way to go with this is to use the Facebook Graph API as suggested and the inbuilt web browser control. Something not overlay obvious was Graph API tool is merely sending web request to "https://graph.facebook.com/v3.0/". I'd also recommend looking into the access tokens, as different types last for different periods of time. If anyone needs any further help on this in the future comment and I'll try and help out.

J34245
  • 300
  • 2
  • 12
  • Can the console app produce a popup window for credentials or do the credentials have to be passed in? – SBFrancies Jul 21 '18 at 19:23
  • They can be a pop up window, eventually I want to put the functionality into a WPF application. But for the time being I just want a console app as I thought it would be easiest. – J34245 Jul 21 '18 at 19:29
  • 1
    Can this question please be taken off "hold"? I've made it as a specific as possible. – J34245 Jul 23 '18 at 10:48
  • Open this question. People need it! I have the same problem here - https://stackoverflow.com/questions/76002136/facebook-login-implementation-in-a-desktop-app-by-best-practices?noredirect=1#comment134046321_76002136 – Rougher Apr 13 '23 at 09:00

1 Answers1

0

I would try using the Facebook Graph API, that seems to be well supported. You will need to authenticate the user and consume a REST Api in your C# code. Get started here..

Here's a good post on consuming rest api in C#

Jeff Anderson
  • 799
  • 7
  • 18