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