How to get deleted events from stream

Feb 18, 2014 at 3:43 PM
Hi
I am using the following code
using (var twitterCtx = new TwitterContext(auth))
        {
            //Log
            await
             (from strm in twitterCtx.Streaming
              where strm.Type == StreamingType.User
              select strm)
             .StartAsync(async strm =>
             {
                 if (!string.IsNullOrWhiteSpace(strm.Content))
                 {
                     Debug.WriteLine(strm.Content + "\n");
                 }
                 //if (count++ >= 100)
                  //   strm.CloseStream();
             });
            // LINQ to Twitter query goes here
        }
    }
And i get all created notifikations and stuff like that but i dont get any notification when i delete a tweet.
I am using the singleuserAuthorizer like this:
var auth = new SingleUserAuthorizer
        {
            CredentialStore = new SingleUserInMemoryCredentialStore
            {
                ConsumerKey = ConfigurationManager.AppSettings["consumerKey"],
                ConsumerSecret = ConfigurationManager.AppSettings["consumerSecret"],
                AccessToken = ConfigurationManager.AppSettings["accessToken"],
                AccessTokenSecret = ConfigurationManager.AppSettings["accessTokenSecret"]
            }
        };
What am i doing wrong ?
Feb 20, 2014 at 9:48 AM
I have looked into the twitter api and i have tried to change my code to this:
await
             (from strm in twitterCtx.Streaming
              where strm.Type == StreamingType.Filter && strm.Follow == "196715720" //&& strm.Track == "twitter"
              select strm)
             .StartAsync(async strm =>
             {
                 if (!string.IsNullOrWhiteSpace(strm.Content))
                 {
                     Debug.WriteLine(strm.Content + "\n");
                 }
                 //if (count++ >= 100)
                  //   strm.CloseStream();
             });
Still no luck.
Any help would be greatly appriciated.
Feb 20, 2014 at 9:58 AM
If someone has a running example that recieves delete notifications then i would be really happy.
Feb 20, 2014 at 12:47 PM
I have done som additional testing and when test in a command prompt using the curl command from the twitter site it works fine.
Could there be a bug in the part of the code that recieves content from the stream ?
Feb 20, 2014 at 1:27 PM
Very weird it seems that a delete event hangs until a tweet new tweet is created ?
Has anybody else seens this behavior ?
Feb 20, 2014 at 2:40 PM
Here is a more concrete example:
I created a new tweet and recieved this stream
{"created_at":"Thu Feb 20 14:42:03 +0000 2014","id":436511067653804032
I deleted the tweet.
But i didnt recieve this event:
{"delete":{"status":{"id":436511067653804032,"user_id":196715720,"id_str":"436511067653804032","user_id_str":"196715720"}}}
Until i created a new tweet 45 minutes later.
{"created_at":"Thu Feb 20 15:31:08 +0000 2014","id":436523420852174848,

Any ideas ?
Coordinator
Feb 20, 2014 at 3:53 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.