2

我正在使用 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];
}
4

0 回答 0