elliottbolzan
elliottbolzan

Reputation: 1077

Upload Image to Facebook Objective-C

I'm currently trying to upload an image from my Mac application to Facebook. To do this, I'd like for the user to simply input his username and password, and to click a button.

The only issue is, Facebook doesn't actually have an API for the Mac, it only has one for iOS. This shouldn't be a problem, except for the fact that to login, you must use a web view, something I'm not to keen on doing, since I'd like the interface to be two simple text fields.

I've also looked into PHFacebook, a class I found online, but it also seems to utilize an NSWebView.

I'm wondering if there's a security issue when you use text fields; indeed, it's slightly strange no available API offers this function !

So, to conclude, is it possible, or is there an API, that lets you upload an image and lets you provide the user's credentials through simple NSStrings?

Upvotes: 0

Views: 768

Answers (3)

erudel
erudel

Reputation: 480

There's a Cocoa framework called MKAbeFook that lets you access Facebook APIs. I don't know if it's up to date, but you should give it a try.

Upvotes: 1

Michael Smith
Michael Smith

Reputation: 498

You could do this through JSON on your mac app but I think the way Facebook protocols work you simply provide the image to upload and then the user logs into their Facebook account through a webview and has to authorize it.

Upvotes: 0

David Parmenter
David Parmenter

Reputation: 535

It looks like this is not supported unless you can embed a web browser.

If you scroll to the bottom of: facebook authentication docs, it seems to say this.

Embedding a web browser is generally doable, but may be overkill for what you are trying to do.

Good luck!

Upvotes: 0

Related Questions