Sunday, January 8, 2012

[YouTube-API] [.net] Unsubscribe Problem.

Hello,
sry for my bad english.

Im working on a programm based on vb.NET.
Uploading, get information and all this stuff works... but unsubscribe
not.
i always get a nullreferenceexception error. Same is in C#

This is my VB Source for unsubscribe

Dim s As Subscription = New Subscription
s.Type = SubscriptionEntry.SubscriptionType.channel
s.UserName = "THE-USER-I-WANNA-UNSUBSCRIBE"
request.delete(s)

Where is the problem?

I use the search and found this code (a little bit other)

Dim subscriptions As Feed(Of Subscription) =
request.GetSubscriptionsFeed("MY-AUTH-USERNAME")
Dim subscription As Subscription
Dim i As Integer

For Each subscription In subscriptions.Entries
i = i + 1
TextBox4.AppendText(i & ": " & subscription.UserName)
subscription.SubscriptionEntry.Delete()
Next

But here it unsubscribe all subscribtion. How could i delete/
unsubscribe a fixed user.

mfg.

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment