Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>u can call the next request in the request handler just after you get the response of twitter friends. </p> <p>Sorry for not elaborating. I thought you would understand. Here is the code.</p> <pre><code> ACAccountStore *account = [[ACAccountStore alloc] init]; ACAccountType *accountType = [account accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; // Request access from the user to access their Twitter account [account requestAccessToAccountsWithType:accountType options:nil completion:^(BOOL granted, NSError *error) { // Did user allow us access? if (granted == YES) { // Populate array with all available Twitter accounts NSArray *arrayOfAccounts = [account accountsWithAccountType:accountType]; // Sanity check if ([arrayOfAccounts count] &gt; 0) { [self postRequest]; } } }]; - (void)PostRequest { // Keep it simple, use the first account available ACAccount *acct = [arrayOfAccounts objectAtIndex:0]; NSMutableDictionary *tempDict = [[NSMutableDictionary alloc] init]; [tempDict setValue:@"Posting video" forKey:@"status"]; // Build a twitter request SLRequest *postRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodPOST URL:[NSURL URLWithString:@"https://api.twitter.com/1.1/statuses/update.json"] parameters:tempDict]; [postRequest setAccount:acct]; [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) { NSLog(@"Twitter response, HTTP response: %i", [urlResponse statusCode]); NSString *output = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; NSLog(@"%@", output); **// calling this again and again will help you with multiple post request.** [self postRequest] }]; } </code></pre> <p>Similar thing can be done for friend list too.</p> <p>Hope I helped.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload