YouTube API v3 PHP - Unsubscribe? -


with youtube api v3 , php can subscribe channel.

$resourceid = new google_service_youtube_resourceid(); $resourceid->setchannelid($_get['id']); $resourceid->setkind('youtube#user'); $subscriptionsnippet = new google_service_youtube_subscriptionsnippet(); $subscriptionsnippet->setresourceid($resourceid); $subscription = new google_service_youtube_subscription(); $subscription->setsnippet($subscriptionsnippet);  $subscriptionresponse = $youtube->subscriptions->insert('id,snippet',     $subscription, array()); 

but how can unsubscribe channel? it's not documented

this found, doesn't how php api: https://developers.google.com/youtube/v3/docs/subscriptions/delete

you need know subscription id. once got can perform deletion:

$youtube->subscriptions->delete($subscription->getid()); 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -