Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: issue in direct messages using streaming api

$
0
0
Hi.

I just wanted this to be confirmed as I am not able to reproduce your issue.

Would you please confirm that the following code is not raising the event.
var us = Stream.CreateUserStream();

us.MessageSent += (sender, args) =>
{
    Console.WriteLine(args.Message);
};

us.FriendIdsReceived += (sender, args) =>
{
    var message = Message.PublishMessage("i love tweetinvi messaging! " + Guid.NewGuid().ToString(), "YOUR_TARGET_USER");

    if (message != null)
    {
        Console.WriteLine("message has been published!");
    }
    else
    {
        Console.WriteLine("message has not been published!");
    }
};

us.StartStream();
What I am doing over there is that I publish a message when the stream is ready to receive the event.

Could you also disable the Exception Handler so that any exception throws.
ExceptionHandler.SwallowWebExceptions = false;
Please let me know if this code works or if you receive any Exception.

Cheers,
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>