Custom Facebook Share Button in Asp.Net

Posted: July 25, 2012 in, Facebook, Uncategorized
Custom Facebook Share Button

Few Days Back I Was Making A Facebook Share Button For My Website But I Wanted To Make a Button With My Custom Design Like Custom Image ,  Summary , Title etc . But I Was Not Getting Any Proper solution . Then I Found Out A Simple Way To Customize Facebook Share Button . So Here I Am Sharing You What I Found.

To Make A Facebook Share Button You Just Need To Add This  Tag In Your HTML/ASP Page.

<a href=”;p%5Btitle%5D=My First Blog&amp;p[summary]=This Is First Geek Blog&amp;p[url]=;&p[images][0]=”>Facebook Share</a>

Here You Can See That I have 4 Fields .

1.Title .. Here you Can Put The Title Of Your Link

2.Summary .. Here You Can Write Your Website Description.

3. URL..Here You Can Write The URL Of Your Website.

4.images .. Here You Can Give The URL Of Your Image.

Asp.Net Users Can Also Dynamically Bind The Data ..

<a id=”lnkFacebook” target=”_blank” runat=”server”>Facebook Share</a>

In c# ..

string title =”My First Blog”;
string url=”;;
string summery=”This Is First Geek Blog”;
string image=”;;

string facebooklink = “;p%5Btitle%5D=”+title;
facebooklink += “&amp;p[summary]=”+summery;
facebooklink += “&amp;p[url]=” + url;
facebooklink += “&amp;&p[images][0]=” + image;
lnkFacebook.HRef = facebooklink;

I have Just Shown an Example . Now You Can Play With This as Much as you Want..:)

I Have Also Attached  Image To Show How Your URL Will Be Displayed ..

Hope This Post Will Help you Somehow . . 🙂

Waiting For Your Valuable Feedback.

  1. I haven’t checked in here for some time because I thought it was getting boring, but the last few posts are good quality so I guess I will add you back to my daily bloglist. You deserve it my friend 🙂

  2. My brother recommended I might like this website. He was entirely right. This post actually made my day. You cann’t imagine simply how much time I had spent for this information! Thanks!

  3. Chirag says:

    Its an awsome share dude 🙂 It Really helped me a lot …..

  4. here says:

    Pondered a good number of doubts concerning this concern to begin with so you own smashed them all through having to present any work of art of a post.

  5. People typically ask about this points plus in the near future, Let me direct these anyone this great site while it secures each of the advice.

  6. wonderful submit as well as quite studying. an accurate vision opener if anyone else is which can be shopping to be able to improve their knowlage.

  7. I simply want to say I’m newbie to blogging and certainly enjoyed this web site. Almost certainly I’m going to bookmark your blog . You surely come with awesome posts. Thanks a lot for sharing with us your web page.

  8. jayashree says:

    hi..i was able to share my link..but when i click on cancel its not geting close..pls suggest me on this

  9. Keep up the superb piece of work, I read few articles on this internet site and I think that your blog is real interesting and contains lots of good info.

  10. Gertrud Moon says:

    Amazing web-site, what precisely I have been in need of! Doubts any content pieces were being longer and even bundled certain pics for extra, I would personally wear luxury!

  11. Fantastic commodities from you, chap. Ive consider your stuff ahead of and youre just as fine amazing. I take pleasure in what youve got acceptably at this juncture, esteem what youre stating and the way you declare it. You make it entertaining and you unchanging at this moment handle to evade file it sensible. I cant hold your fire to get through additional beginning you. So as to is especially an incredible weblog.

  12. nero says:

    Hiya. Self-same cool site!! Guy .. Exquisite .. Superb .. I will bookmark your web site and acquire the feeds also…I’m content to find hence a good deal practical facts acceptably at this point surrounded by the post. Show appreciation you for sharing…

  13. Lata tolani says:

    Hi, this is a wonderful post 🙂 Thanks alot.

    Just have one doubt what does “s” parameter stands for , because if I am removing “s” parameter then nothing is coming

  14. vimal says:

    i tried this trick, it just showed only upto facebook share box link section..afterthat when i tried to post the shared link,it didnt shared on my wall..

  15. ugrprmk says:

    hi, this is great code but, my image path is
    but it shows anything. when i add “s” before there is also nothing.
    how can i fix it ?

  16. shiva says:

    good article. easy to understand

  17. Vibhor says:

    Good Post

  18. Adisa,T says:

    The image is not displaying after sharing

  19. Johnd495 says:

    I do not even know how I stopped up here, however I assumed this put up was good. I do not recognise who you are however definitely you’re going to a wellknown blogger for those who are not already eeggkgdeakef

  20. Ashu says:

    Hello Sir,
    I am not geting the proper result.
    On my facebook page it shows only Url and the comment which we write at time of sharing.
    Please give me guidance as soon as possible

  21. sujay says:

    i am not getting the result image is not showing properly as well as content are also showing something different

  22. Takwirira says:

    Do you have an updated version of this code? Seems Facebook strip out all custom variables now.

  23. bhavesh says:


  24. How I can automatically select the share on my managed pages to share the post on my pages

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s