Twitter的整合在iOS 6中和谷歌整合在iOS 6中的应用(twitter Integrati

2019-10-17 13:13发布

是否有任何教程,我整合与Twitter和谷歌的iOS 6应用程序。 我已经搜索了很多,但我找不到任何很好的例子或代码。 请人指导我。

Answer 1:

在iOS的5,6使用Twitter的验证码。

if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
{
    SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
    [tweetSheet setInitialText:@"Tweeting from my own app! :)"];
    [self presentViewController:tweetSheet animated:YES completion:nil];
}
else
{
    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Sorry" message:@"You can't send a tweet right now, make sure your device has an internet connection and you have at least one Twitter account setup" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alertView show];
}


文章来源: twitter Integration in ios 6 and Google Integration in ios 6 app