3

I'm using sharer.php to share an item to the user's wall.

The facebook sharer has 2 views:

Post to profile (default view) : alt text http://devgator.com/images/post_to_profile.png

And when you click on "send as a Message instead you get : alt text http://devgator.com/images/send_as_msg.png

What I'm trying to do is to have the 2nd view (send a message) as the default one. So when the user clicks 'Share this', it would show him directly the "send a message" view.

Is that even possible using facebook? or anything else? maybe executing js code after the popups opens ?

Thanks.

Soufiane Hassou
  • 17,257
  • 2
  • 39
  • 75
  • Have you find an answer to this question? I would love to know whether this is possible or not :) – Jørn Schou-Rode Oct 05 '10 at 11:50
  • @Jørn: Unfortunately no. Maybe it's now implemented in the new API, I'm not sure. – Soufiane Hassou Oct 06 '10 at 03:18
  • I think it's not possible ! Facebook doesnt permit it or document it. I even tried a hacky solution involving an iframe pointing to sharer.php and some javascript to simulate a click on the "send as a message instead" but it doesnt work for 2 reasons : 1) facebook detects it's in an iframe and display a link "go to facebook" instead of the real content and the browsers security do not allow to interact with javascript on an iframe pointing to another domain. – dwarfy Apr 24 '11 at 10:37
  • It's not even possible to design a custom solution that would send a message to the user because you CANT send a message using facebook api. see http://stackoverflow.com/questions/2574431/facebook-api-send-messages-to-friends – dwarfy Apr 24 '11 at 10:41

2 Answers2

1

It's undocumented, but you can pass &mode=message&to=<user_id> to default to send message with sharer.php. Note: the like and/or send buttons are recommended.

J Starr
  • 984
  • 6
  • 19
1

Facebook just released a new "send" button to go with the "like" button.

This button allows you to send message directly to your friends ..

Here is an example :

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:send href="example.com" font=""></fb:send>

See documentation : http://developers.facebook.com/docs/reference/plugins/send/

I think it's a solution for your problem ?

dwarfy
  • 3,076
  • 18
  • 22