How to add facebook share button on my website?

前端 未结 7 1618
情书的邮戳
情书的邮戳 2020-12-02 04:09

I have this code that suppose to work, but doesn\'t work. If this helps you in anyway that would be great.



        
7条回答
  •  暖寄归人
    2020-12-02 04:34

    You can do this by using asynchronous Javascript SDK provided by facebook

    Have a look at the following code

    FB Javascript SDK initialization

    Note: Remember to replace YOUR APP ID with your facebook AppId. If you don't have facebook AppId and you don't know how to create please check this

    Add JQuery Library, I would preferred Google Library

    
    

    Add share dialog box (You can customize this dialog box by setting up parameters

    
    

    Now finally add image button

    
    

    For more detailed kind of information. please click here

提交回复
热议问题