我正在使用Twitter框架工作进行twitter连接。它完美登录但登录后没有重定向到我的应用程序。登录后,手动关闭设置页面,如何以编程方式重定向到应用程序。我怎样才能做到这一点?请帮我。提前致谢。我使用下面的代码
if ([TWTweetComposeViewController canSendTweet])
{
// Create account store, followed by a twitter account identifer
account = [[ACAccountStore alloc] init];
ACAccountType *accountType = [account accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
// Request access from the user to use their Twitter accounts.
[account requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error)
{
// Did user allow us access?
if (granted == YES)
{
// Populate array with all available Twitter accounts
twitterInfoArray = [account accountsWithAccountType:accountType];
NSLog(@"account = %@", account);
NSLog(@"arrayOfAccounts = %@", twitterInfoArray);
// Populate the tableview
if ([twitterInfoArray count] > 0)
{
[self performSelectorOnMainThread:@selector(StartwithTwitterUser) withObject:NULL waitUntilDone:NO];
}
else
{
NSLog(@"Not Login");
}
}
}];
}
else
{
[self LoadTwiiter];
}