1

I had list all Twitter accounts in tableview of the First view controller. In that view controller i had select one account from that table view and pass that account object to second view controller. In second view controller i had assign ACAccount object directly to SLRequest object account variable as fallows

    ACAccount *twitterAccount=_mySelectedAccount;//My Account get from first view controller is pass here.
    NSLog(@"%@",twitterAccount.username); //This line works fine.
    NSURL *requestURL=[NSURL URLWithString:@"https://api.twitter.com/1.1/statuses/home_timeline.json"];

    NSMutableDictionary *parameters=[NSMutableDictionary new];
    [parameters setObject:@"200" forKey:@"count"];


    SLRequest *post=[SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodGET URL:requestURL parameters:parameters];

    post.account=twitterAccount;

Error got at post.account=twitterAccount; This code is working fine for IOS 7 but in IOS 6 I got an error as fallow

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid account type for this request'

How to rectify this problem ? Thanks in advance.

Velmurugan S
  • 619
  • 3
  • 21

0 Answers0