2013-02-14 5 views
0

Я знаю, что Apple создает социальную среду, но мое приложение предназначено только для iOS 5, поэтому мне нужно знать, какие другие способы его реализовать?Как я могу интегрировать Facebook в iOS 5?

+1

Вы проверили https://developers.facebook.com/ios/ – vqdave

+0

вы можете использовать Sharekit или использовать Facebook Иос .. SDK – lakesh

ответ

1

Быстрый поиск Google взял меня прямо на сайте разработчиков facebook API с информацией по этой теме очень

FacebookIOSTutorial

+0

спасибо, что посмотрю – iPive

0

социальной базы, используемой для размещения текста и изображений, URL на пользователя стене. Существует код для использования. добавить оператор импорта

#import <Social/Social.h> 
- (IBAction)postToFacebook 
{ 
spinner.hidden=YES; 
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) 
{ 
    SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; 

    [controller setInitialText:@"Check this Beautiful App of ASI Delhi Circle"]; 
    //[controller addImage:imageView1.image]; 
    [controller addURL:[NSURL URLWithString:@"http://play.google.com/store/apps/details?id=com.asidelhicircle"]]; 
    [self presentViewController:controller animated:YES completion:Nil]; 
}else 
{ 
    UIAlertView *alert=[[UIAlertView alloc] initWithTitle:nil message:@"Please Login in Facebook application." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; 

    [alert show]; 
    [alert release]; 
} 

}

- (IBAction)postToTwitter 
{ 
    if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) 
    { 
    SLComposeViewController *tweetSheet = [SLComposeViewController 
              composeViewControllerForServiceType:SLServiceTypeTwitter]; 
     [tweetSheet setInitialText:@"Check this Beautiful App of ASI Delhi Circle http://play.google.com/store/apps/details?id=com.asidelhicircle"]; 
    [self presentViewController:tweetSheet animated:YES completion:nil]; 
}else 
{ 
    UIAlertView *alert=[[UIAlertView alloc] initWithTitle:nil message:@"Please Login in Twitter application." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; 

    [alert show]; 
    [alert release]; 
} 

}

Смежные вопросы