开发者

YouTube subscribe button in iphone app

开发者 https://www.devze.com 2023-02-19 06:25 出处:网络
How do I add to an iPhone application, a button that will subscribe to a YouTube channel? I tried using:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号