twitter Integration in ios 6 and Google Integration in ios 6 app

故事扮演 提交于 2019-12-11 14:32:16

问题


Is there any tutorial to integrate my iOS 6 app with Twitter and Google. I have searched a lot but I could not find any good example or code. Please anyone guide me.


回答1:


Use this code for twitter in iOS 5,6.

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];
}


来源:https://stackoverflow.com/questions/14050554/twitter-integration-in-ios-6-and-google-integration-in-ios-6-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!