Guest User

Untitled

a guest
Aug 12th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. FQL in the SDK 3.0 Beta for iOS
  2. [[[FBRequest alloc] initWithSession:...
  3. restMethod:...
  4. parameters:...
  5. HTTPMethod:...]
  6. startWithCompletionHandler:...];
  7.  
  8. FBRequest *fql = [FBRequest requestForGraphPath:@"fql"];
  9. [fql.parameters setObject:@"SELECT uid, name, pic_square FROM user WHERE uid = me()"
  10. @"OR uid IN (SELECT uid2 FROM friend WHERE uid1 = me())"
  11. forKey:@"q"];
  12.  
  13. [fql startWithCompletionHandler:^(FBRequestConnection *connection,
  14. id result,
  15. NSError *error) {
  16. if (result) {
  17. NSLog(@"result:%@", result);
  18. }
  19. }];
  20.  
  21. FBRequestConnection *conn = [[FBRequestConnection alloc] init];
  22. [conn addRequest:fqlRequest1 completionHandler:^(FBRequestConnection *connection,
  23. id result,
  24. NSError *error) {
  25. if (result) {
  26. NSLog(@"result:%@", result);
  27. }
  28. }];
  29.  
  30. [conn addRequest:fqlRequest2 completionHandler:^(FBRequestConnection *connection,
  31. id result,
  32. NSError *error) {
  33. if (result) {
  34. NSLog(@"result:%@", result);
  35. }
  36. }];
  37.  
  38. [conn start];
Advertisement
Add Comment
Please, Sign In to add comment