0

I am using the following code to post on facebook wall and it is working fine, but I need a call back after a successful post.

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml">

<script>
function fbs_click() {

  u=location.href;

  t=document.title;

  window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');

  return false;
}

<style> html .fb_share_button { display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; height:15px; border:1px solid #d8dfea; background:url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top right; } html .fb_share_button:hover { color:#fff; border-color:#295582; background:#3b5998 url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top right; text-decoration:none; } </style>


<a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share</a>

I need an alert after the successful post, no need to get the user id or anything.

But I need a post or share option because if I have like button on my page then they cant like it more then ones. I need the user to post about my link many times they want.

Thanks.

MSMOHAN
  • 235
  • 1
  • 11
  • if you use the Like plugin then you can [subscribe](https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/) to the `edge.create` event. I don't think this would work with the **old** sharer method though. – ifaour Nov 01 '12 at 20:19
  • But I need a post or share button because if I have like button on my page then they cant like it more then ones. I need the user to post about my link many times they want. – MSMOHAN Nov 01 '12 at 20:30
  • How about using the Feed dialog instead? It gives you the ID of the new post in return if the user chose to post. https://developers.facebook.com/docs/reference/dialogs/feed/ – CBroe Nov 02 '12 at 09:43

0 Answers0