multiple facebutton button like with different values - facebook

Is it possible to have multiple og:title(etc) in a page?
I have 4 different products on same page (url: site/#theblock)
I want my users to share the product with the correct link on their FB.
I tried jquery but its not working.
Im using a wordpress cms.
Any idea how to do it?
Thanks

You need to use some server side technology to dynamically change the og tags based on query string parameters. Hash tags will not work since they are only used by the browser and are not sent to the server.
The reason to set the og tags server side is because Facebook's scraper does not run JavaScript and therefore your server needs to make the correct tags upon serving the page.

Related

AMP errors in web master tool

I have implemented AMP successfully for my webpages and google started indexing it, which I came to know via WebMaster tool. I am facing some issues which is present and disappears in short span of time.
Issue logged are:
User authored JavaScript found on page
The pages doesn't contain any script tags except schema.
This error is showing for few pages from 120 pages instead of following same
template. Below is the image link:
Have some more query:
I have observe different amp urls getting redirected to its original page when the same amp url is being used in Web Browser.
Is Google taking care of it or its on us to do the redirection?
I am planning to implement the sign in and share buttons on my web pages which will be using javascript. But if I do so, I do get validation error. So what is the right approach.
Can anyone please help me on this?
Please ensure that all script tags are of type application/ld+json. There should be no executable code in these script tags.
Redirection is something that you must be doing on your end. Google doesn't do any sort of redirection from AMP to non-amp pages if the URL is hit directly. In fact that URL schema that Google uses in their carousel is entirely their own, and just includes the path to your page inside it. E.g. https://cdn.ampproject.org/v/www.yoursitehere.com/path/to/article.html
Social sharing using Javascript inserted in the page is not allowed, as no Javascript is allowed. If you want to use social sharing, use a non-javascript implemention, or try out the amp-social-share
thanks for the response. As per the query which I asked
Please ensure that all script tags are of type application/ld+json. There should be no executable code in these script tags - I am not using any Script as of now except amp only
Redirection is something that you must be doing on your end. Google doesn't do any sort of redirection from AMP to non-amp pages if the URL is hit directly. In fact that URL schema that Google uses in their carousel is entirely their own, and just includes the path to your page inside it. E.g. https://cdn.ampproject.org/v/www.yoursitehere.com/path/to/article.html -
Understood
Social sharing using Javascript inserted in the page is not allowed, as no Javascript is allowed. If you want to use social sharing, use a non-javascript implementation, or try out the amp-social-share - Implemented Social Share and its working fine
Can we implement AMP for eCommerce sites where a lot of JavaScript, forms, plugins can be included? As of my knowledge AMP wants to keep it simple and thus restrict as many JavaScript, form tag is not valid only. So is there any chance we can implement AMP on eCommerce sites.

Changing metadata for Ember.js apps

I have problems with linking my website (built with Ember.js) to Facebook (for each page - there's the same title, description, image etc - of course). I'm wondering if there is any solution to fight with this, without bringing that metadata (for each page) directly from the backend? I would like to change title, description, image etc for each page.
You can actually change title, description and other meta tags (by extending routes in Ember.js), but this is done only on client side and won't actually change the data so that Facebook for example can read the data and get the proper results.
Also, I cannot just put meta tags in since that it's not valid.
So, is there any other solution to properly use "open graph" metadata inside Ember.js app?
Concrete example:
http://www.skripinc.com/ -> this is the page about which I'm talking about. When I try to share it on Facebook, it will always pull the same Title, Description and image, which is set under metadata inside . I want to be able to have different metadata for each page, without bringing the data from the backend (with PHP or whatever).

Variable og: tags

Hello and thanks for checking out my question.
<meta property="og:image" content="http://www.myurl.com/images/test.png"/>
I have an application that is intended to service multiple "campaigns", each having its own graphic and description I would like to show when someone likes the page. I can update the meta tags all I want but FB will still only use the most recently scraped data (from the nightly scrape or from the linter).
I read that I might be able to cURL to the linter to have it pull the new data right before the like is sent, but what happens when I am servicing hundreds+ of people and multiple campaigns?
Is there any way around this? I have not found any solid solutions after several hours of searching.
tl;dr
I want my posted likes to respect the current meta tags and ignore or update the FB cache for that data.
Each object / page needs its own URL, even if those URLs are handled by the same code -using a query string parameter in the URL to identify different objects is the most common way to achieve this, with server-side URL rewriting being another

The title, link and description don't work

I've been reading guides and examples for a long time (hours) but I can't manage. I tried to use all html meta tag like title, description, and og:property. Also tried to use the link sharer and also to create a new blank page with just the info I want to share to facebook in order to test. Also I tried to generate an random url in php so to have always a different url variable (the url to share and also the url of the main page containing the script). I also grabbed (url linter) a lot of time the url to clean the cache of facebook. It always give me the title of the site domain as title or the url itself as the shared title and description. I don't know what to do.
The main web site is from joomla. In the code of index of joomla I put a php include if the url has the variable "articolo" id. This incuded php page has regulat head body etc. So maybe I facebook check the main meta of joomla first? So now I tried to open a popup with just the page for sharing. Look here: link
It's possible that the title is locked in, meaning that after X number of likes Facebook doesn't allow you to change it anymore. Can you give us an example URL you're having issues with?
EDIT
Ok, now the link you provided shows some very interesting output. http://modernolatina.it/wjs/index.php?option=com_content&view=article&id=96&Itemid=258&autore=6&articolo=6
First, you webserver, instead of sending back a 200 code, is sending back a 500 code.
Secondly the HTML your webserver is sending back has two HTML tags (Do a view source on the content returned)
Fix up those two issues and I think the linter will be happier with your page.
Test your page here:
http://developers.facebook.com/tools/debug

How to share a few specific elements of a page only

I have a page of products on my website with a share button on each, now how can I tell facebook to automatically select the title and image of the product shared rather than the whole page.
A link to my site
The site is written using php on smarty type script with tpl files,
ps i dont really know php very well.
Thanks in advance :)
A server side scripting language would be the easiest:
in php you could share the page + an extra variable , then if your page detects this variable you can set specific meta data.
http://www.fancydressclothing.net/categories/49/1950s-Costumes.php?product=1
And in php fetch the correct data for product 1 and set the meta data:
http://developers.facebook.com/docs/opengraph/
You should use a canonical URL for each product which will help in two ways. One with the facebook linter getting the correct og tags. And two, helping your SEO rankings too.