Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:19:03+00:00 2026-06-08T08:19:03+00:00

I am pretty new at programming, so please don’t burn me too bad. I

  • 0

I am pretty new at programming, so please don’t burn me too bad. I downloaded the Hackbook version for Facebook. However, I have a number of view controllers that will use the ‘share this’ button but I don’t know how to do it. I know that I want to use the functions that are already in place.

@implementation ViewConcertsViewController
...

-(IBAction)shareThis:(id)sender{
[appDelegate.facebook authorize:nil delegate:self];
                APICallsViewController *apiViewController = [[APICallsViewController alloc] initWithNibName:nil bundle:nil];
                [apiViewController shareButton];
}

Then in my APICallsViewController, I have:

-(void)shareButton{
[self performSelector:@selector(//what do I put in here!!!!)];
}

Thank you in advance.

This is what I did:

@implementation ViewConcertsViewController
...
-(IBAction)shareThis:(id)sender{
    APICallsViewController *apiViewController = [[APICallsViewController alloc] initWithNibName:nil bundle:nil];
    [apiViewController shareButton:sender];
}


@implementation APICallsViewController
...
-(void)shareButton:(id)sender{
    SEL selector = NSSelectorFromString(@"getAppUsersFriendsNotUsing");
    if ([self respondsToSelector:selector]) {
        [self performSelector:selector];
    }
}

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:19:04+00:00Added an answer on June 8, 2026 at 8:19 am

    Looks like you just need to change up the method in the Hackbook Sample in the APICallsViewController.


    /*
     * Dialog: Feed for friend
     */
    - (void)apiDialogFeedFriend:(NSString *)friendID {
        currentAPICall = kDialogFeedFriend;
        SBJSON *jsonWriter = [[SBJSON new] autorelease];
    
        NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
                                                               @"Get Started",@"name",@"http://m.facebook.com/apps/hackbookios/",@"link", nil], nil];
        NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
        // The "to" parameter targets the post to a friend
        NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                       friendID, @"to",
                                       @"I'm using the Hackbook for iOS app", @"name",
                                       @"Hackbook for iOS.", @"caption",
                                       @"Check out Hackbook for iOS to learn how you can make your iOS apps social using Facebook Platform.", @"description",
                                       @"http://m.facebook.com/apps/hackbookios/", @"link",
                                       @"http://www.facebookmobileweb.com/hackbook/img/facebook_icon_large.png", @"picture",
                                       actionLinksStr, @"actions",
                                       nil];
    
        HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
        [[delegate facebook] dialog:@"feed"
                          andParams:params
                        andDelegate:self];
    
    }
    

    But if you looking to send an AppRequest (not the same thing as share button on a webpare) then checkout
    - (void)apiDialogRequestsSendTarget:(NSString *)friend

    So what do you want to share? A status update, a photo, a link to a URL, a Facebook app request there is. Lot to share so it’s kind of hard to know where you want to go. [limk]http://developers.facebook.com/docs/reference/iossdk/request/. And hers [link]http://developers.facebook.com/docs/reference/dialogs/ there are 7 default one-two line code to share stuff

    There are currently 7 Dialogs available for you to use:

    **
    -The Feed Dialog allows a user to post a story to their Timeline and to their friends’ News Feeds

    -The OAuth Dialog allows a user to authorize an application as part of an authentication flow.

    -The Add Page Tab Dialog allows a user to add an application to a Facebook Page which they administer.

    -The Friends Dialog allows a user to send a friend request to another user.

    -The Pay Dialog allows a user to make a purchase using Facebook Credits.

    -The Requests Dialog allows a user to send a request to one or more of their friends

    -The Send Dialog allows a user to send a Facebook Message to one or more of their friends.
    **

    But if you can give more details of the tasks it will make it easier to provide help and samples.
    For my expierence setting up application project in xcode to use the fb sdk with your custom app Id from apple and Facebook is the hard part. I would highly reccomend starting a Xcode project from scratch. It will take a bit more but once you set up an app from start to logged-in and have friends data via FBRequest you will be able to move very fast.

    Starting from an sample app you will always have stuff in the background going on you can’t fix or improve or really use the API like you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm pretty new to programming for Linux environments, so I don't exactly know what
I'm pretty new in iphone programming and have stumbled upon this issue which I
I am pretty new to thread-safe programming, and was wondering if I have something
I am pretty new to programming(just finished University). I have been thought in the
I'm pretty new to OOP (and also in PHP programming), and I have some
I am pretty new to programming in c#. I have a listview (ListViewProjects) box
I'm still pretty new to programming so I have somewhat of a noob question.
I'm pretty new to programming, and I'm creating a simple text-based game.> I'm wondering
I'm pretty new to programming C# and windows phone... In my Windows Phone App
I’m pretty new to programming, so bear with me if my question isn’t specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.