15

I recently came across Web Intents, specifically Twitter's.

I was looking for (and couldn't find) if Facebook has such API, specifically for posting to groups (public groups) and posting to some (public) wall.

Blaszard
  • 30,954
  • 51
  • 153
  • 233
Nadav
  • 1,167
  • 2
  • 19
  • 43

4 Answers4

8

Yes. https://developers.facebook.com/docs/sharing/reference/share-dialog

https://www.facebook.com/dialog/share? app_id=145634995501895 &display=page &href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F&redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fexplorer

D3RPZ1LLA
  • 281
  • 3
  • 8
6

Facebook supports sharing intent: http://facebook.com/sharer.php?u= (read this) and dialog feed: https://www.facebook.com/dialog/feed? (documented here and here - how to change its popup size). While Facebook doesn't document the sharer currently, I've never seen any notice that it is going to be deprecated at any time and many websites use it.

On our website I use both the sharer (when the shared object has a page associated with it - sharer.php relies on OG tags, you can test any page at Facebook debugger) and the dialog feed (when the object doesn't have a page and I need more control of picture/other elements of the share). The main difference of dialog feed, that can be its disadvantage, is that the object is shared via your app, so it is less likely to appear in user's friends' feeds. Also the picture preview shared via dialog feed is smaller. The object shared via sharer.php looks and behaves as it would if the user shared it, that in many cases could be a preferred way.

Community
  • 1
  • 1
esp
  • 7,314
  • 6
  • 49
  • 79
  • Aren't they depreciating sharer.php? – Kyle Hotchkiss Apr 17 '13 at 23:58
  • I've never seen any official notice that sharer.php is going to be deprecated - please post the link here if you find it. Facebook seems to avoid advertising or documenting it, but it works and used by many websites. Updated the answer. – esp Apr 18 '13 at 21:56
  • Not sure why this was down-voted. This appears to be supported (albeit at a slightly different URL): https://developers.facebook.com/docs/reference/plugins/share-links/ Found via the accepted answer. – James Skemp Jun 24 '13 at 19:05
  • Actually ... this isn't what I was looking for. This'll work if you want to share a link only. ... I dislike Facebook. – James Skemp Jun 24 '13 at 19:25
  • @JamesSkemp you mean you can't share big picture via this dialogue? You can configure a lot via the meta-tags of the page. – esp Jun 24 '13 at 21:28
  • 1
    @esp you still get the up-vote but I was looking for something like https://twitter.com/intent/tweet?text=Message, but for Facebook. – James Skemp Jun 24 '13 at 21:34
0

It looks like the (new?) sharing dialog has URL support and allows sharing not just URLs but open graph events as well. It is the closest thing I've found

https://developers.facebook.com/docs/sharing/reference/share-dialog

Peter
  • 29,498
  • 21
  • 89
  • 122
0

Short answer: No. There is no such thing as an RESTful API, per se, that you can implement easily that will take care of interaction/authentication for you.

That being said, here are a number of social plugins which seem to do what you are looking for: https://developers.facebook.com/docs/plugins/

Metagrapher
  • 8,602
  • 1
  • 24
  • 31
  • 4
    New api allows for share by URL https://developers.facebook.com/docs/sharing/reference/share-dialog – D3RPZ1LLA Apr 20 '15 at 17:31
  • BEFORE YOU DOWNVOTE: Look at the age of the answer. And then consider that it costs you points to downvote. Is it worth it? Really? – Metagrapher Feb 22 '17 at 22:22