Advertisement
Guest User

Untitled

a guest
Jul 14th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. - (void)createOGObjectForImage:(NSURL *)imageURL
  2. {
  3. NSMutableDictionary<FBGraphObject> *object =
  4. [FBGraphObject openGraphObjectForPostWithType:@"ogminigame:mini_game"
  5. title:@"Mini Game"
  6. image:@"https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png"
  7. url:imageURL
  8. description:@""];
  9.  
  10. [FBRequestConnection startForPostWithGraphPath:@"me"
  11. graphObject:object
  12. completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
  13. if(!error) {
  14. NSLog(@"Result: %@", [result description]);
  15. [self createOGActionWithResult:result];
  16. } else {
  17. NSLog(@"Error posting the Open Graph object to the Object API: %@", error);
  18. [self sharePhotoWithShareDialog:self openGraphAction:nil];
  19. }
  20. }];
  21. }
  22.  
  23. "FACEBOOK_NON_JSON_RESULT" = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement