Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing SLRequest in iOS 6 with Facebook
    primarykey
    data
    text
    <p>I'm currently trying to use an SLRequest to post a status on to facebook this is the code i have:</p> <pre><code>ACAccountStore *accountStore = [[ACAccountStore alloc] init]; ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; NSLog(@"0"); [accountStore requestAccessToAccountsWithType:accountType options:@{ACFacebookAppIdKey : @"00000000000", ACFacebookPermissionsKey : @"publish_stream", ACFacebookAudienceKey : ACFacebookAudienceFriends} completion:^(BOOL granted, NSError *error) { if(granted) { NSLog(@"1"); NSArray *accountsArray = [accountStore accountsWithAccountType:accountType]; NSLog(@"2"); if ([accountsArray count] &gt; 0) { NSLog(@"3"); ACAccount *facebookAccount = [accountsArray objectAtIndex:0]; NSLog(@"4"); SLRequest *facebookRequest = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodPOST URL:[NSURL URLWithString:@"https://graph.facebook.com/me/feed"] parameters:[NSDictionary dictionaryWithObject:post forKey:@"message"]]; NSLog(@"5"); [facebookRequest setAccount:facebookAccount]; NSLog(@"6"); [facebookRequest performRequestWithHandler:^(NSData* responseData, NSHTTPURLResponse* urlResponse, NSError* error) { NSLog(@"%@", [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]); }]; } } }]; </code></pre> <p>however the code i have doesn't want to get past <code>if(granted){</code> but i can't tell why what I've done isn't working. Any help would be appreciated!</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.
 

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