简体   繁体   English

如何使用返回网址创建一个Facebook共享链接?

[英]How to create a Facebook share link with return url?

I would like to know how to make a Facebook share link, of which has a return value to go to a different page. 我想知道如何建立一个Facebook共享链接,该链接的返回值可转到另一个页面。 I have read that, although still available, the Facebook Share button was deprecated when Facebook launched the like button and the Like button contains of the sum of likes, shares and messages of URL. 我读到,尽管仍然可用,但当Facebook启动“赞”按钮时,“ Facebook分享”按钮已过时,“赞”按钮包含URL的喜欢,分享和消息之和。

For this question I am using a different situation, of which is very much the same. 对于这个问题,我使用的是不同的情况,其中的情况几乎相同。 Once the user clicks to share, it will open up a JQuery dialog with an iframe in side of the Facebook share. 用户单击共享后,它将打开一个JQuery对话框,其中iframe位于Facebook共享的一侧。 Upon the user clicking to share, I would like to know how to listen for this so I can add to my own custom share button with counter and then to also redirect to a different URL which offers on for them sharing our 当用户单击共享时,我想知道如何收听此消息,因此我可以将其添加到带有计数器的自定义共享按钮中,然后还重定向到另一个URL,以供他们共享我们的

I have created a basic Dialog with a button to open it on JSFiddle: http://jsfiddle.net/kbJ57/ 我创建了一个带有按钮的基本对话框,可以在JSFiddle上打开它: http : //jsfiddle.net/kbJ57/

<a href="#" id="open">Share This!</a>

<div id="dialog-message" title="Share on Facebook!">
        <p>iFrame goes here</p>
</div>

This this example, please just show something like Google after the user has shared and any random page to share if you are able to help out with programming this, and I thank you so very much if you do. 在这个示例中,如果您能够帮助编程,请在用户共享后显示一个类似Google之类的内容,并分享任何随机页面,如果您能这样做,我非常感谢。

Best Regards, 最好的祝福,

Tim 提姆

Edit: Looking at a page of a game I play, there is a share button at the bottom so I gather you can still do shares, I'm just not sure how to. 编辑:看着我玩的游戏页面,底部有一个分享按钮,因此我收集您仍然可以进行分享,但我不确定该怎么做。 (the link: http://services.runescape.com/m=news/behind-the-scenes-april-2013 ) (链接: http : //services.runescape.com/m=news/behind-the-scenes-april-2013

The short answer is that you need to create a facebook app and integrate that into your website in order to do sharing. 简短的答案是,您需要创建一个Facebook应用程序并将其集成到您的网站中以进行共享。

See developers.facebook.com for more info. 有关更多信息,请参见developers.facebook.com。 As far as I know there isn't an "easy" way to do facebook sharing as it requires that the user authorize you to post on their behalf. 据我所知,没有一种“简单”的方式来进行Facebook共享,因为它需要用户授权您代表他们发帖。

EDIT: I misunderstood the intent of the asker initially. 编辑:我最初误解了问质者的意图。 Try using the facebook sharer: www.facebook.com/sharer.php?u= [the url you want to share properly escaped] 尝试使用Facebook共享程序:www.facebook.com/sharer.php?u= [您要正确共享的网址转义了]

Format the metadata of your site using the opengraph tags to have facebook pick up the content. 使用opengraph标记设置网站的元数据格式,以使Facebook拾取内容。 Good details here: http://alistapart.com/article/like-able-content-spread-your-message-with-third-party-metadata 此处的详细信息: http : //alistapart.com/article/like-able-content-spread-your-message-with-third-party-metadata

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

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