Created
August 19, 2013 13:36
-
-
Save bugcloud/6269193 to your computer and use it in GitHub Desktop.
[iOS] Facebook SDKのSSOボタンをローカライズする ref: http://qiita.com/bugcloud/items/a61a5a43fb8a601b850d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
platform :ios, '6.1' | |
pod 'Facebook-iOS-SDK' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FBLoginView (aka FBLV) */ | |
"FBLV:LogOutButton" = "ログアウト"; | |
"FBLV:LogInButton" = "Facebookでログイン"; | |
"FBLV:LoggedInAs" = "%@ でログイン中"; | |
"FBLV:LoggedInUsingFacebook" = "Facebookでログインしました"; | |
"FBLV:LogOutAction" = "ログアウト"; | |
"FBLV:CancelAction" = "キャンセル"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.h | |
// FBSample | |
// | |
#import <UIKit/UIKit.h> | |
#import <FacebookSDK/FacebookSDK.h> | |
@interface ViewController : UIViewController <FBLoginViewDelegate> | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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