An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Hi @Gennady Gurin ,
Thank you for sharing your code and the FBClient_Simple implementation.
I took a closer look at both files, and I noticed something that may help explain why your application displays a message ID even though no message appears in Messenger.
The overall flow of your code makes sense: you attempt to log in, retrieve your user ID, send a message, and then display the result.
However, the FBClient_Simple implementation you shared appears to be a sample designed to simulate these operations rather than communicate directly with Facebook Messenger.
For example, in the DoLogin() method:
await Task.Delay(100);
generatedAccountId = Guid.NewGuid().ToString();
loginState = true;
Here, Task.Delay(100) simply pauses the program for 100 milliseconds. The method then generates a random ID and marks the login as successful.
This is useful when testing an application's flow, but it does not actually authenticate your Facebook account.
Similarly, in the SendMessage() method:
await Task.Delay(100);
return $"msg_sent_{Guid.NewGuid().ToString().Substring(0, 8)}";
The method generates a message ID locally without sending a request to Facebook.
This would explain why your application reports a message ID even though no message is received.
To send an actual Messenger message, the application would need an implementation that communicates with Facebook's messaging service.
There is an existing third-party C# project called fbchat-sharp that provides a Messenger client implementation. However, it uses an unofficial Facebook interface, so compatibility with the current Messenger service cannot be guaranteed.
For supported integrations, Meta also provides the official Messenger Platform API, although this follows a different model involving Facebook Pages rather than direct personal-account messaging.
Before suggesting a specific implementation, could you please confirm whether the FBClient_Simple file you attached is the complete version used by your application, or whether you have another version that performs the actual Facebook requests?
This will help determine the most appropriate next step.
If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation
Thank you.