Specific implementation of the facebook sharing function on the webpage-PHP source code

Source: Internet
Author: User
This article introduces the specific implementation of the facebook sharing function on the webpage. for detailed code, see this article to introduce the specific implementation of the facebook sharing function on the webpage. for detailed code, see this article

The code is as follows:

 


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

Url: https://www.php1.cn

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:

 



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.

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.