'How to send and Receive messages using Facebook Messenger API
i am using C# library for FB Messenger API here - https://www.nuget.org/packages/facebook-messenger-net-lib/
But i think there is lack of some documentation . i am trying below code to send message but message is not delivering . Token I am using is Page Access Token generated from Graph api explorer tools.
Code I am trying ( Console Application Code )
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FacebookMessengerLib;
namespace FmAPI
{
class Program
{
static void Main(string[] args)
{
MessengerAPI obj = new MessengerAPI("EAACEdEose0cBAOSSBMZAZCd2OTZBT95ZBQbdd69B4eRbWcrWFdZAvUOrnk57DrnaHZARh3lIgZBGxzolZAMjQry9fiZCFjFzQEJJElZATgzTIQB3HsTZCyaimLzeetd37LhTG3yhwfGlxE7ojtdnupopsN3s1ZAzSgQPuxSsgf56MqpJPwZDZD");
obj.SendTextMessageAsync(660746514005471, "Hello");
}
}
}
Solution 1:[1]
in order to get user's reply you need to make sure you subscribe the app to the page: https://developers.facebook.com/docs/messenger-platform/product-overview/setup#subscribe_app
maybe it has something to do with it..
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Guy Dubrovski |