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

  • Home
  • SEARCH
  • 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 505595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:36:53+00:00 2026-05-13T06:36:53+00:00

After looking I did come accross this post on the facebook forums: link They

  • 0

After looking I did come accross this post on the facebook forums:

link

They are feeding the facebook object a UIImage. That seems logical, but where is this documented? The API documentation is generalized to all platforms. Where are the iPhone specific requirements for arguments and their data types?

Thanks

******Update*****
I still have not came across any API docs pertaining to Cocoa. I did, however, gather the information I needed by piecing together forum information, Facebook sample code, and some glue.

Hopefully they’ll issue something a little more concrete over the next few months.

  • 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-05-13T06:36:53+00:00Added an answer on May 13, 2026 at 6:36 am

    For completeness:

    The following explains how to interact with Facebook Connect:
    https://developers.facebook.com/docs/guides/web/

    The API calls:
    https://developers.facebook.com/docs/reference/api/

    If you need extended Permissions:
    https://developers.facebook.com/docs/guides/policy/examples_and_explanations/Extended_Permissions/

    A nice Obj-C wrapper on Mobile Orchard:
    http://www.mobileorchard.com/marketing-in-code-part-2-setting-a-users-status-in-facebook-from-an-iphone-app-a-tutorial/

    What follows is my implementation of a SessionViewController:

    #import "SessionViewController.h"
    #import "FBConnect.h"
    #import "FBFeedDialog.h"
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    // This application will not work until you enter your Facebook application's API key here:
    
    static NSString* kApiKey = @"XXXXXXXXXXXXXXXXXX";
    
    // Enter either your API secret or a callback URL (as described in documentation):
    static NSString* kApiSecret = @"XXXXXXXXXXXXXXXXXX"; // @"<YOUR SECRET KEY>";
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    
    @implementation SessionViewController
    
    @synthesize label = _label;
    @synthesize anImage;
    
    - (void)done:(id)sender{
    
        [self dismissModalViewControllerAnimated:YES];
    
    
    }
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    // NSObject
    
    - (id)init {
        if (self = [super init]) {
            _session = [[FBSession sessionForApplication:kApiKey secret:kApiSecret delegate:self] retain];
        }
        return self;
    }
    
    
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
      if (self = [super initWithNibName:@"SessionViewController" bundle:nibBundleOrNil]) {
          _session = [[FBSession sessionForApplication:kApiKey secret:kApiSecret delegate:self] retain];
    
      }
      return self;
    }
    
    - (void)dealloc {
        [_session release];
        [anImage release];
        [super dealloc];
    }
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    // UIViewController
    
    - (void)viewDidLoad {
      [_session resume];
      _loginButton.style = FBLoginButtonStyleWide;
    }
    
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
      return NO;
    }
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    // FBDialogDelegate
    
    - (void)dialog:(FBDialog*)dialog didFailWithError:(NSError*)error {
      _label.text = [NSString stringWithFormat:@"Error(%d) %@", error.code,
        error.localizedDescription];
    }
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    // FBSessionDelegate
    
    - (void)session:(FBSession*)session didLogin:(FBUID)uid {
      _permissionButton.hidden = NO;
      _feedButton.hidden = NO;
    
      NSString* fql = [NSString stringWithFormat:
        @"select uid,name from user where uid == %lld", session.uid];
    
      NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];
      [[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params];
    }
    
    - (void)sessionDidLogout:(FBSession*)session {
      _label.text = @"";
      _permissionButton.hidden = YES;
      _feedButton.hidden = YES;
    }
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    // FBRequestDelegate
    
    - (void)request:(FBRequest*)request didLoad:(id)result {
    
        if([result isKindOfClass:[NSArray class]]){
            NSArray* users = result;
            NSDictionary* user = [users objectAtIndex:0];
            NSString* name = [user objectForKey:@"name"];
            _label.text = [NSString stringWithFormat:@"Logged in as %@", name];
        }  
    
    }
    
    - (void)request:(FBRequest*)request didFailWithError:(NSError*)error {
      _label.text = [NSString stringWithFormat:@"Error(%d) %@", error.code,
        error.localizedDescription];
    }
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    
    - (IBAction)askPermissionForPhotoUpload:(id)target {
        FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease];
        dialog.delegate = self;
        dialog.permission = @"photo_upload";
        [dialog show];
    }
    - (IBAction)publishPhoto:(id)target{
    
        NSMutableDictionary *args = [[[NSMutableDictionary alloc] init] autorelease];
        [args setObject:self.anImage forKey:@"image"];  
        FBRequest *uploadPhotoRequest = [FBRequest requestWithDelegate:self];
        [uploadPhotoRequest call:@"photos.upload" params:args];
    }
    
    
    - (void)askPermission:(id)target {
      FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease];
      dialog.delegate = self;
      dialog.permission = @"status_update";
      [dialog show];
    }
    
    - (void)publishFeed:(id)target {
      FBFeedDialog* dialog = [[[FBFeedDialog alloc] init] autorelease];
      dialog.delegate = self;
      dialog.templateBundleId = 9999999;
      dialog.templateData = @"{\"key1\": \"value1\"}";
      [dialog show];
    }
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query that is dynamically built after looking up a field list
I'm looking for a multiline regex that will match occurrences after a blank line.
In this post Jon Skeet pointed out that the following code should be changed
After looking at other questions related to sharing solutions between VS 2005 and VS
After looking at another question on SO ( Using NaN in C++ ) I
After looking on MSDN, it's still unclear to me how I should form a
I am in the process of writing a text editor. After looking at other
I am looking to setup a transition between two levels(after one level is complete,
What I am looking for is a way to call a method after another
I'm looking for a linux utility that can alter the payloads of network packets

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.