Facebook sharing on the webpage _ PHP Tutorial

Source: Internet
Author: User
The facebook sharing function is implemented on the webpage. Copy the code as follows: spanspanstyleword-wrap: normal The code is as follows:




Digress: directly jump to the share button on the facebook login page:

Url: http://www.facebook.com/sharer.php? U = www.baidu.com & t = 123213123

Here, the u parameter is the link you want to share. The t parameter is not clear yet.

Facebook sharing:

Share page settings

1. a link: the parameter is the link of the page to be shared

The code is as follows:


Title = "Share on Facebook" target = "_ blank"
Onclick = "javascript: window. open ('http: // www.facebook.com/sharer.php? U = '+ encodeURIComponent ('https: // www.baidu.com') + '& t =' + encodeURIComponent (document. title), 'newwindow', 'width = 800, height = 400 ', 'center'); void (0); ">



2. fb tags:

The code is as follows:


Test




Note:

1. title fb can automatically read the title of the page to be shared. This should be set in the sharer. php parameter of fb.
You can also set the method as follows:

The code is as follows:




2. the image tag can be written to multiple persons who share the image. you can select the image by yourself.

3. url is the page you want to share
4. description

Tip:

The image pixel must be 100*100. in this format, 90*90 is OK.

For example, if 300*100 150*50 is taken on www.facebook.com, the 90x90 image is incorrectly displayed.
If the picture is smaller, the pop-up box for sharing will not show your picture. This happens when the picture is smaller than 90x90.

The http://www.bkjia.com/PHPjc/728112.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/728112.htmlTechArticle code is as follows: span style = "font-family: Verdana, Arial, Helvetica, sans-serif; word-wrap: normal; word-break: normal; line-height: 19.5px; "span style =" word-wrap: normal...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.