如何使用return url创建Facebook共享链接?

问题描述:

I would like to know how to make a Facebook share link, of which has a return value to go to a different page. 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.

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. 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

I have created a basic Dialog with a button to open it on 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.

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 )

我想知道如何建立一个Facebook共享链接,其中有一个返回值可以转到另一个 页。 我已经读过,虽然仍然可用,Facebook分享按钮在Facebook推出like按钮时被弃用,而Like按钮包含了URL的喜欢,分享和消息的总和。 p>

For 这个问题我使用的是另一种情况,其中大致相同。 一旦用户点击共享,它将打开一个JQuery对话框,其中包含Facebook共享旁边的iframe。 当用户点击分享时,我想知道如何听取这个,这样我就可以添加到我自己的自定义分享按钮与计数器,然后还重定向到另一个URL,为他们分享我们的 p> \ n

我创建了一个基本的对话框,其中有一个按钮可以在JSFiddle上打开它: http://jsfiddle.net / kbJ57 / p>

 &lt; a href =“#”id =“open”&gt;分享这个!&lt; / a&gt; 
 
&lt; div  id =“dialog-message”title =“在Facebook上分享!”&gt; 
&lt; p&gt; iFrame转到此处&lt; / p&gt; 
&lt; / div&gt; 
  code>  pre> 
 
  

这个例子,请在用户共享后显示类似谷歌的东西,如果能够帮助编程,请在任何随机页面上分享,如果你这样做,我非常感谢你。 p>

最诚挚的问候, p>

Tim p>

编辑 strong>:查看游戏页面我 玩,底部有一个分享按钮所以我收集你仍然可以做股票,我只是不知道如何。 (链接: http://services.runescape.com/m =新闻/幕后 - 2013年4月) p> div>

The short answer is that you need to create a facebook app and integrate that into your website in order to do sharing.

See developers.facebook.com for more info. 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.

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]

Format the metadata of your site using the opengraph tags to have facebook pick up the content. Good details here: http://alistapart.com/article/like-able-content-spread-your-message-with-third-party-metadata