YouTube subscribe button in iphone app
How do I add to an iPhone application, a button that will subscribe to a YouTube channel?
I tried using:
-(void)subscribe:(id)sender
开发者_运维问答 {
NSString* str = [NSString stringWithFormat:@"%@%@",@"http://www.youtube.com/subscription_center?add_user=",YouTubeUserName];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
but this shows a Youtube screen, where I have a login/sign in button. When pressing login it leads to a 404 page not found error.
Any suggestions?
Thanks
I would recommend using Youtube's API to get this done. It's more complicated since you will need to authenticate the user beforehand but is a more thorough and seamless approach for getting this done.
精彩评论