Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.95 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Set orientation on fbgraph api login page in ipad?
  2. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
  3.  
  4.     [self login];
  5.  
  6.     [self.window addSubview:viewController.view];
  7.     [self.window makeKeyAndVisible];    
  8.    return YES;
  9. }
  10.        
  11. -(void) login
  12. {
  13.     /*Facebook Application ID*/
  14.     NSString *client_id = @"226801547398501";
  15.  
  16.     //alloc and initalize our FbGraph instance
  17.     self.fbGraph = [[FbGraph alloc] initWithFbClientID:client_id];
  18.  
  19.     //begin the authentication process.....
  20.     [fbGraph authenticateUserWithCallbackObject:self andSelector:@selector(fbGraphCallback:)
  21.                          andExtendedPermissions:@"user_photos,user_videos,publish_stream,offline_access,user_checkins,friends_checkins"];
  22.  
  23.  
  24.  
  25. }
  26.        
  27. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  28.     return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
  29. }