I want to share a specific content of my site by way of a link, and I would that when I share it on Facebook, Twitter, Google+, etc., a certain image, title and description will be shown.
It's so easy when I share my site URL because it's sufficient to modify the related meta tags, but it is not so trivial do it with a specific content you want share with dedicated image, title, description.
I thought, since these information shall be specified in meta tags why not to enclose my content into an iframe which contains a simple html page with all necessary meta tags?
This way when I try to share my link on a social network the content summary will be filled with my meta tags infos.
Have you a smarter solution?
Well, I believe that every social media have different ways to get this information, and some do not even need them (like twitter does not need a picture to a tweet).
And they are always changing how they do it, facebook is an example url parties is being deprecated and they are forcing us to use their api to share / like / whatever.
What you can do is to work with these differences on their own, or get js social plugins to handle it for you.
edit: here are some plugins http://community.paper.li/2012/10/15/top-8-social-media-plugins-for-your-blog-or-website/
Related
After I add a link (facebook.com) on Google plus, it shows me:
I want to do same thing on my page but I don't know what it is (Enter url location -> connect to the page and get some informations (logo, name, title...) -> display).
p/s: Sorry for javascript tag, I'm not sure it can be done with javascript or jquery or something else.
This is basically done with Meta tags of the page you're targeting. Google Plus (and Facebook for example) fetch this metadata from the page you're linking to, parse it and show what they want to show.
It's not an actual iframe or embed.
Take a look at The Open Graph protocol: http://ogp.me/
For example if you look at the DOM of the OGP page you'll find some meta tags like:
<meta property="og:description" content="The Open Graph protocol enables any web page to become a rich object in a social graph.">
Now if you're paste that link (http://ogp.me/) into Facebook, that's exactly what will be displayed there. Google Plus doesn't fetch this description for example, it just takes og:image and og:title.
If you want to know how to grab these information of the specified page you should search for questions about that directly, for example here: How can I retrieve og/meta attributes of a resource?
Hope it helps.
I am looking for some helpful gems in ruby for scraping purposes. Basically, I am looking to be able to scrape the main body from the page. That is, only the main body and its media (images). No sidebar or footer or navbar type of stuff.
I know scraping requires a lot of specificities like knowing the classes and ids and so on. So I am wondering if there is a tool that does something like this?
A good example would be the "Reader View Available" option in safari when on iOS. Where it just shows the raw content from the page. With required headers and paragraphs.
Use Nokogiri
And you can also use Css Selector Gadget to find your classes. This should be helpful to find proper header and body classes or id's.
Reader View doesn't save bandwidth
I have seen examples of how to define which page certain ads display ('tag','accountants'), but what I want is to know the code that will dynamically pull the tag (or whatever I define) from the current url which I have targeted my display ad to from dfp. ('Tag','get-current-url')
I have over a thousand different tag pages on a database driven site and need to have certain ads served on certain tag pages.
I'm sure this is simple but having no luck finding what dfp JavaScript that needs to go into my site to pull add via url.
I wrote a jquery dfp plugin that allows you to do exactly this.
It allows you to target the domain, url and query parameters of the url.
Take a look at the Default targeting section on the github page, it sounds like you might want to use the inURL targeting... to do that you just need to add a new custom targeting string of inURL within the inventory section of the DFP admin and then you can set the Customised criteria in the ad targeting section of the line item and everything should just work... any questions let me know.
Is there still a way to add custom links to links footer in facebook share post (e.g. next to "Like - Comment - Share" below the text of text of the post itself)? Some "link" parameter or something, maybe? Or is it deprecated now?
Thanks in advance.
With the current API, I don't see any way to add additional links to a feed posting other than in the content of the message or as the primary link of a feed link share.
I'm trying to build in a facebook share button on a news section of a site. I would like to specify which picture, title and text to use for the share.
Due to limitations in the cms that the website uses i can't add the open graph meta in the header of the page. I've tried updating the og meta with javascript and just adding them in the body instead to no success.
Is there any other way to specify image, title and text in facebook share using just xslt or client side tech like javascript?
To my knowledge, you can't do this with share buttons. However, you can get similar functionality out of stream.publish.