Facebook sharing features on the Web page to achieve _php skills

Source: Internet
Author: User
Copy Code code 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; Word-break:normal; Line-height:19px "></span></span>

Digression: Jump directly to the Facebook login page Share button:

URL is: http://www.facebook.com/sharer.php?u=www.baidu.com&t=123213123

One of the U parameters for the link you want to share. The T parameter is not clear yet.

The realization of Facebook sharing function:

Share page settings

1. A link: parameters are links to the pages to be shared
Copy Code code as follows:

<a style= "DISPLAY:INLINE-BLOCK;WIDTH:35PX; height:40px; position:relative; top:10px; left:48px; "
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 Identified Tags:
Copy Code code as follows:

<title>test</</span>title>
<meta property= "Og:image" content= "Test/test.jpg"/>
<meta property= "og:description" content= "test>"/>
<meta property= "Og:url" content= "https://www.baidu.com"/>

Attention:

1.title FB can automatically read the title of the page to be shared to be set in FB sharer.php parameters
You can set up your own way.
Copy Code code as follows:

<meta property= "Og:title" content= "test"/>

2.image tags can write multiple sharing people can choose their own pictures

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

Tips:

Picture pixels must be 100*100 such a format I use 90*90 is OK

For example: 300*100 150*50 in www.facebook.com image will intercept 90x90 picture display is not correct
If the picture is smaller and worse, the shared pop-up box will not show your picture This situation happens in the picture is less 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.