Marcos Crispino
Marcos Crispino

Reputation: 8218

Facebook URL scheme to post a new message from iPhone

I am developing an iPhone application, and want it to be able to post a message to Facebook, by using the Facebook app.

Is there a custom URL to do this?

I've found this page that has a list of Facebook commands, but it doesn't say how to post a new message...

Upvotes: 1

Views: 10785

Answers (4)

Marcos Crispino
Marcos Crispino

Reputation: 8218

The URL to post a new message to the wall is

fb://publish/?text=some text to post

This works with Facebook app 4.1... I don't know if it works with older versions.

Upvotes: 3

Vincent Guerci
Vincent Guerci

Reputation: 14419

This answer might help you... Especially this : fb://messaging/compose

Upvotes: 1

Blitz
Blitz

Reputation: 5671

You could also just use Sharekit, that gives your users the option what to share. Otherwise, you'll have to use the FBDialog from the facebook-ios-sdk or a matching webview using the URL given by the other posters
The method you mention, directly calling the facebook app, a) requires the app to be installed (usually not the case on iPads, for example) and b) is not officially supported by facebook - the two other ways are.

Upvotes: 0

Soatl
Soatl

Reputation: 10592

If you are talking about using a feed post then you have to do this: [facebook dialog:@"feed" andDelegate:self];

See here for more info

Also if your making this a mobile web app then you could try this:

http://www.facebook.com/dialog/oauth? client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&display=touch

More info on web app

Upvotes: 1

Related Questions