Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. NSString *pageId = @"##################";
  2. NSString *urlString = [NSString stringWithFormat:@"https://www.facebook.com/feeds/page.php?format=json&id=%@", pageId];
  3. NSURL *url = [NSURL URLWithString:urlString];
  4. NSURLRequest *request = [NSURLRequest requestWithURL:url];
  5. self.tags = [[NSArray alloc] initWithObjects:@"#meditation", nil];
  6.  
  7. [NSURLConnection sendAsynchronousRequest:request
  8. queue:[NSOperationQueue mainQueue]
  9. completionHandler:^(NSURLResponse *response,
  10. NSData *data, NSError *connectionError)
  11. {
  12. QuoteItem *menuItem = [[QuoteItem alloc] init];
  13. if (data.length > 0 && connectionError == nil)
  14. {
  15. NSDictionary *fbFeed = [NSJSONSerialization JSONObjectWithData:data
  16. options:0
  17. error:NULL];
  18.  
  19. NSMutableArray *entries = [fbFeed objectForKey:@"entries"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement