小编Raj*_*y K的帖子

facebook登录使用FBloginView未在ios 6中显示

我正在尝试使用FBloginView为facebook创建登录按钮.以下是我写的代码.

- (void)viewDidLoad
{
[super viewDidLoad];

if(!loginview)
    loginview = [[FBLoginView alloc] initWithPermissions:[NSArray arrayWithObject:@"publish_actions, user_photos,status_update"]]; // Whatever permissions you need

loginview.frame = self.view.bounds; //whatever you want

loginview.delegate = self;

[self.view addSubview:loginview];
// Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

- (void)loginViewShowingLoggedInUser:(FBLoginView *)loginView {

NSLog(@"Logged In");

}

- (void)loginViewFetchedUserInfo:(FBLoginView *)loginView
                        user:(id<FBGraphUser>)user {
NSLog(@"user Id %@",user.id);

}
- (void)loginViewShowingLoggedOutUser:(FBLoginView *)loginView {
// Called …
Run Code Online (Sandbox Code Playgroud)

iphone ios

4
推荐指数
1
解决办法
4047
查看次数

标签 统计

ios ×1

iphone ×1