Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more: , +
I am creating a project for news website and i need to connect the news in facebook.i tried so many facebook share codes given in google but i couldn't get correct result.
i now have code from one website (i.e)
HTML
<%
PageLink="http://thamizharnadu.com/view.asp?view=" & request("view")
iFrameCode="<iframe src=’http://www.facebook.com/plugins/like.php?href=" & PageLink & "&layout=standard&show-faces=true&width=160&action=like&font=tahoma&" &_
"colorscheme=light’ scrolling=’no’ frameborder=’0′ allowTransparency=’true’ style=’border:none; overflow:hidden; width:160px; height:90px’></iframe>"
%>

<%
response.write(iFrameCode)
%>


but i am getting [; expected error]

can anyone suggest me a correct code..Please i am trying it for more than one week.Kindly help me to get a code.

my link is dynamic .
Posted
Updated 19-Dec-13 23:42pm
v2
Comments
ritav1991 24-Feb-14 4:20am    
how to share website link to facebook..
plz give some idea.or its related code.

1 solution

JavaScript
create javascript function 



  function renderFbLike() {
            var PageLink="set page link"; 
            var parent = document.getElementById('fblikediv');
            var child = document.getElementById('fblikeimg');
            parent.removeChild(child);

           var html2 = " <iframe src=\"http://www.facebook.com/plugins/like.php?href=" +PageLink + "&send=false&layout=standard&width=225&show_faces=false&font=arial&colorscheme=light&action=like&height=35\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:250px; height:35px;\" allowTransparency=\"true\"></iframe>";

         document.getElementById('fblikediv').innerHTML = html2;
        }


HTML
download image fb-like-button.png and give path to img src
aspx page 

<pre lang="xml"><div id="fblikediv" style="width:930px; margin:auto;">
                        <img src="images/fb-like-button.png" id="fblikeimg" onMouseOver="return renderFbLike();"></div>
   <div class=" internal-container">


May Be it will help You
 
Share this answer
 
v4
Comments
RamaDinakaran 21-Dec-13 6:41am    
hi,
i have changed the "set page link"; with "http://thamizharnadu.com/view.asp?view=" & request("view")
but there is no result with this code. can anybody help me again..
ritav1991 24-Feb-14 4:18am    
how to share website link to facebook..
plz give some idea.or its related code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900