0

In my iOS app I am not able to login with facebook.

 FBSDKCoreKit/FBSDKCoreKit.h
 FBSDKLoginKit/FBSDKLoginKit.h
 Social/Social.h

-(void)didMoveToView:(SKView *)view
{
 FBLoginView *loginView = [[FBLoginView alloc] init];
loginView.delegate=self;
loginView.readPermissions=@[@"public_profile",@"email",@"user_friends"];
[self.view addSubview:loginView];
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];   
content.contentURL = [NSURL URLWithString:@"https://developers.facebook.com"];

FBSDKShareButton *button = [[FBSDKShareButton alloc] initWithFrame:CGRectMake(0, 150, 200, 30)];
button.shareContent = content;

   [self.view addSubview:button];
}
Braiam
  • 1
  • 11
  • 47
  • 78
  • what is the error you are getting ? – Dheeraj Singh Apr 13 '15 at 04:36
  • there are no error,it is starting search Share button I think and recalling didMoveToView.What is good way to add login View in Scene? – Narek Chameleon Apr 13 '15 at 13:32
  • You can create a ViewController to contains your UI (buttons and all), and use NSNotification from your Scene to send message to your ViewController. For example: [this question](http://stackoverflow.com/questions/19438719/how-do-i-present-a-uiviewcontroller-from-skscene) – amudi Apr 20 '15 at 03:37

0 Answers0