在我的应用程序中,我必须在不使用登录页面的情况下登录 Facebook,然后直接进入 Facebook 的主屏幕。
我已经搜索了很多,但我没有得到任何东西......
@interface Facebook (MyApp)
- (void)myAuthorize:(id<FBSessionDelegate>)delegate;
@end
@implementation Facebook (MyApp)
- (void)myAuthorize:(id<FBSessionDelegate>)delegate {
_permissions = [[NSArray arrayWithObjects:@"email", *(whatever you need)*, nil] retain];
_sessionDelegate = delegate;
[self authorizeWithFBAppAuth:NO safariAuth:NO]; // force in app auth
}
@end
Facebook *facebook = [[Facebook alloc] initWithAppId:MY_APP_FB_ID];
[facebook myAuthorize:self];