http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.google.com
How can I customize the text and image. It looks like Facebook pulled the docs.
Head over to Meta's documentation and use their button configurator to get the code for a Like and Share Button, or a Share Button. Once you select the options for your custom button, click the Get Code button and a new dialog box will appear with two different scripts.
To share a post you see on your Feed: Below a post, tap Share in the bottom right. To share to a friend's timeline, tap Feed below your name, then select On a friend's timeline. Type your friend's name, then tap Share Now.
What you are talking about is the preview image and text that Facebook extracts when you share a link. Facebook uses the Open Graph Protocol to get this data.
Essentially, all you'll have to do is place these og:meta
tags on the URL that you want to share -
<meta property="og:title" content="The Rock"/> <meta property="og:type" content="movie"/> <meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/> <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/> <meta property="og:site_name" content="IMDb"/> <meta property="fb:admins" content="USER_ID"/> <meta property="og:description" content="A group of U.S. Marines, under command of a renegade general, take over Alcatraz and threaten San Francisco Bay with biological weapons."/>
As you can see there are both an image property and a description. When you make changes to your pages og:meta
tags, you can test these changes using the Facebook Debugger. It will tell you if you have made any mistakes (and how to fix them!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With