简体   繁体   English

Facebook的sharer.php - 默认视图

[英]Facebook's sharer.php - default view

I'm using sharer.php to share an item to the user's wall. 我正在使用sharer.php将项目共享给用户的墙。

The facebook sharer has 2 views: facebook sharer有2次观看:

Post to profile (default view) : alt text http://devgator.com/images/post_to_profile.png 发布到个人资料(默认视图): 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 当你点击“发送消息而不是你得到: 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? 甚至可以使用Facebook吗? or anything else? 或其他什么? maybe executing js code after the popups opens ? 可能在弹出窗口打开后执行js代码?

Thanks. 谢谢。

It's undocumented, but you can pass &mode=message&to=<user_id> to default to send message with sharer.php. 它没有文档,但您可以将&mode=message&to=<user_id>传递给默认值以使用sharer.php发送消息。 Note: the like and/or send buttons are recommended. 注意:建议使用类似和/或发送按钮。

Facebook just released a new "send" button to go with the "like" button. Facebook 刚刚发布了一个新的“发送”按钮,用于“喜欢”按钮。

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/ 请参阅文档: http//developers.facebook.com/docs/reference/plugins/send/

I think it's a solution for your problem ? 我认为这是解决您问题的方法吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM