0

I am working in a project where I need to get the friend's list of a person in Facebook. For that I need to implement social framework in my project. When i look for that framework I am getting share kit in all sites. Get share kit. Could you please tell me from where can I get that social framework. If possible provide me a sample code for implementing the above concept that I have mentioned.

Any Help will be appreciated

Amit Tomar
  • 4,800
  • 6
  • 50
  • 83
iPhone_suren
  • 181
  • 1
  • 3
  • 13

5 Answers5

2

For Facebook you can use official facebook-ios-sdk (any version, but facebook makes release 3.0beta - more understandable and flexible than 2.0)

Tutorial for you here

After that, it is good to read samples and other things.

And you need to download sdk from github. - it is simple, too.

gaussblurinc
  • 3,642
  • 9
  • 35
  • 64
  • Also, it is interesting to read questions like mine about Facebook-sdk: http://stackoverflow.com/questions/11686252/facebook-ios-sdk-how-to-correct-build-framework-and-add-it-to-project – gaussblurinc Jul 28 '12 at 06:22
0

For implementing Facebook in your project use the latest FBGraph Method which is the latest from Facebook. You will have to import the FBGraph and the JSON parser first. Then add the following methods in the class you want to add the shareview :)

Here's some code to help you along,

-(void)buttonActionFb
{
//postFeedButton.hidden=NO;

NSString *client_id = @"130902823636657";
self.fbGraph =[[FbGraph alloc] initWithFbClientID:client_id];

[fbGraph authenticateUserWithCallbackObject:self andSelector:@selector(fbGraphCallback:) andExtendedPermissions:@"user_photos,user_videos,publish_stream,offline_access,user_checkins,friends_checkins"];

}

- (void)fbGraphCallback:(id)sender
 {
if ((fbGraph.accessToken==nil)||([fbGraph.accessToken length]==0)) {
    // NSLog(@"You pressed the 'cancel' or 'Dont Allow' button, you are NOT logged into Facebook...");

    //resart authentication process...
    [fbGraph authenticateUserWithCallbackObject:self andSelector:@selector(fbGraphCallback:) andExtendedPermissions:@"user_photos,user_videos,publish_stream,offline_access,user_checkins,friends_checkins"];            }    
else
{

    UIAlertView *alertfB=[[UIAlertView alloc] initWithTitle:@"Note" message:nil
                                                 delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
    [alertfB show];
    //  NSLog(@"LOG IN FACEBBOK %@",fbGraph.accessToken);    

}

}
IronManGill
  • 7,222
  • 2
  • 31
  • 52
0

firstly you just login with your Facebook/twitter account and then on button click (where you want to share the data on Facebook or twitter ) and write this code

  NSArray *activityItems;
    activityItems = @[@"Text Here",self.imgview.image];
UIActivityViewController *activityController =
[[UIActivityViewController alloc]
 initWithActivityItems:activityItems
 applicationActivities:nil];

[self presentViewController:activityController
                   animated:YES completion:nil];

imgview is the UIimageView outlet and this simply share your text and image on the Facebook/Twitter ;-) i think this is help you

Waseem Shah
  • 2,219
  • 23
  • 23
0

Integrated with IOS 6 there are interfaces that allows you to post to FB without importing any external framework, in the same way that you used to present a mail interface, More info at : http://developer.apple.com/library/ios/#documentation/Social/Reference/Social_Framework/_index.html#//apple_ref/doc/uid/TP40012233

Jorge
  • 1
-1

Social Framework is actually under NDA, so if you aren't a registered Developer, you can't get that.

Rickye
  • 1,023
  • 1
  • 9
  • 16
  • No longer a valid answer, is it? – Bo Persson Oct 10 '12 at 13:21
  • This should be a comment, not an answer. – iwasrobbed Sep 18 '13 at 01:46
  • First: That time I couldn't write a comment and second, why to pick up a 1,5 thread just to downwote? BTW, who are you to decide what should be a comment and what shouldn't? For his question at the time it was asked this was the answer! It was under NDA so if he wasn't a registered developer he probably have pirated that software. If he was then he should have known (and he also agreed to) that these questions can't be asked and/or discussed on public forums because beta softwares and its APIs are intended to paid, registered developers. – Rickye Sep 18 '13 at 06:23