Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem in facebook share functionality
    text
    copied!<p>I have a facebook iframe application where i have provided a share functionality. I am using this code :</p> <pre><code>&lt;script&gt; function fbs_click() { u='&lt;?php echo $shareURL;?&gt;'; t=document.title; window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&amp;t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436'); return false; } &lt;/script&gt; &lt;style&gt; 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://b.static.ak.fbcdn.net/rsrc.php/z39E0/hash/ya8q506x.gif) no-repeat top right; } html .fb_share_button:hover { color:#b5b8d3; border-color:#295582; background:#3b5998 url(http://b.static.ak.fbcdn.net/rsrc.php/z39E0/hash/ya8q506x.gif) no-repeat top right; text-decoration:none; } &lt;/style&gt; &lt;a href="http://www.facebook.com/share.php?u=&lt;url&gt;" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;"&gt;Share&lt;/a&gt; </code></pre> <p>The problem i am facing is that if i pass u to my site url then inside share box title is properly displayed but when posted to my profile, clicking on the link redirects me to outside of my facebook application which i don't want i want it to remain inside facebook page. However if i change u parameter to something like <a href="http://apps.facebook.com/app/" rel="nofollow noreferrer">http://apps.facebook.com/app/</a> then inside share box the title is showing apps.facebook.com and when posted on my profile, clicking on it redirects me inside the facebook application but onto a new tab.</p> <p>I just want the title should be set according to the value passed and if i click on it on my profile page it should remain inside facebook.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload