Skip to content

Instantly share code, notes, and snippets.

@bugcloud
Created August 19, 2013 13:36
Show Gist options
  • Save bugcloud/6269193 to your computer and use it in GitHub Desktop.
Save bugcloud/6269193 to your computer and use it in GitHub Desktop.
[iOS] Facebook SDKのSSOボタンをローカライズする ref: http://qiita.com/bugcloud/items/a61a5a43fb8a601b850d
platform :ios, '6.1'
pod 'Facebook-iOS-SDK'
/* FBLoginView (aka FBLV) */
"FBLV:LogOutButton" = "ログアウト";
"FBLV:LogInButton" = "Facebookでログイン";
"FBLV:LoggedInAs" = "%@ でログイン中";
"FBLV:LoggedInUsingFacebook" = "Facebookでログインしました";
"FBLV:LogOutAction" = "ログアウト";
"FBLV:CancelAction" = "キャンセル";
//
// ViewController.h
// FBSample
//
#import <UIKit/UIKit.h>
#import <FacebookSDK/FacebookSDK.h>
@interface ViewController : UIViewController <FBLoginViewDelegate>
@end
//
// ViewController.m
// FBSample
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
FBLoginView *loginBtn = [[FBLoginView alloc] initWithFrame:CGRectMake(
self.view.frame.size.width / 2 - 154,
self.view.frame.size.height / 2 - 22,
308,
44)
];
loginBtn.readPermissions = @[@"basic_info"];
loginBtn.delegate = self;
[self.view addSubview:loginBtn];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment