Kit Sunde
Kit Sunde

Reputation: 37095

Is it possible to post to a users feed with a share action link?

I've noticed sometimes there's a share link on some things in my feed. Is it possible to post to a users wall and attach an action link that has a share option that would create a share dialogue directly on the users feed? Something like this:

FB.ui({
    method: "feed",
    name: 'sometitle',
    caption: 'somecaption',
    description: 'some description',
    link: 'http://www.facebook.com/pages/1234?sk=app_234123123',
    picture: 'http://www.facebook.com/favicon.ico',
    actions: [{
        name: 'share',
        link: '????'
        }]
     });

Upvotes: 1

Views: 1755

Answers (3)

Iskandar Najmuddin
Iskandar Najmuddin

Reputation: 2876

This is an outstanding FB issue.

Here's the FB bug: https://developers.facebook.com/bugs/164888633588257

Upvotes: 1

covati
covati

Reputation: 899

Sorry, Hoang isn't quite correct. You can create a share link, but it is a bit hobbled. Within your actions array, you should have a name of 'share' and a link as shown here:

$attachment['actions'] = array('name'=>'Share', 'link'=>"http://www.facebook.com/sharer.php?u=". urlencode($href))

While this won't pop up a native dialog box, it will give you some semblance of the share functionality.

Upvotes: 0

Hoàng Long
Hoàng Long

Reputation: 10848

I don't think it's possible. From the document, only the following option accepted : message, picture, link, name, caption, description, source.

I think it's easier to put some javascript in the target page(link), which call the share api seperately.

Upvotes: 1

Related Questions