Facebook only gets my metatags if I hard-code them.It doesn't read them if I pass variables from smarty - facebook

I am working on an online store.
It's made with Prestashop 1.3.6
I am trying to embed a like and send button in the product page.
I have set up my og tags,and tested it with the debugger.
My problem is that the tags only get read by facebook if I hardcode them in the header.tpl.
If I pass smarty variables the tags appear as empty.
It's kind of driving me crazy because I can not find someone with the same problem.
The tags appear in the browser source code in both cases (hard-coded and variable).
But facebook reads them only when I hardcode them.
Here is the link to my site,maybe you can figure it out.
The thing that I don't understand is that before putting og:tags,facebook was taking the default title and description tags off my page.
And those tags were passed by variable.
So I really don't understand why it doesn't work.
Any ideas ?
Thanx a lot in advance!

Related

Tumblr share url

I've came across this page https://www.tumblr.com/examples/share/sharing-links-to-articles.html which shows a possible way to customly create a share URL for tumblr.
Simplified version of what they have:
Click to share
http://jsfiddle.net/m5ow6bhs/2/
This will take you to the log in page or straight to the share page if you're already logged in. However, if you change the http%3A%2F%2F part to a simple http:// it will now load to a "Not Found Page". http://jsfiddle.net/m5ow6bhs/3/ What the hell Tumblr?
Do you guys have any idea what's going on or what's the correct code to share something to Tumblr?
Cheers.
As with most share services, the URL should be passed as an encoded string. This supports the OPs comments about http%3A%2F%2F(encoded) and http:// (raw).
Tumblr provides variable transformations in the theme operators to handle encoding, but sadly it doesn't work with custom variables.
One quick solution is to drop the http:// part. Example: http://jsfiddle.net/L9jd8dhz/
I have discovered as of recently that the share URL needs to be updated as such:
https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=<-urlencode(share_url)->&posttype=link
The &posttype= seems to be a new requirement to make the share work correctly.

Need help - FB Like button does not post to wall

Hello fellow community members,
I was unable to find a helpful answer, so I will give this a try: I recently developed a website that has a FB "Recommend" (same as "Like") button implemented. I have never dealt with this before, hence my complete lack of knowledge.
Now, I implemented the code the FB developer's Like page (--> http://developers.facebook.com/docs/reference/plugins/like/) creates correctly into the website (both the script and the DIV-tag, yet something that is not automatically generated seems to be missing and needs to be added for the button to work correctly. It currently does not post to the FB wall.
Upon doing a debugging check, I received the following results: [...]
Unfortunately, I have no clue what to do with that data. How and where exactly in the HTML code do I implement those missing TAGS and PROPERTIES? Any help would be highly appreciated...
Kind regards & many thanks in advance, :-)
Doc
It looks like you're missing the Open Graph meta tags. Those go into the head of your page.
Facebook has a generator to help you create the tags, but you'll need to add them into your markup.

POST a form in Facebook iFrame application does not work

My application has "survived" many Facebook API changes, to the point where it's quite messy.
Anyway: I'm no longer able to POST a simple HTML form. The entire page reloads and no data is saved.
I've tried several things. Changing the "action" url to include several Facebook parameters, changing the target (canvas_iframe) but to no avail.
Has anyone else encountered problems with this?
try to write absolute path in "action". Its not important include Facebook parameter
Give site url("www.example.com/") as the value of the action attribute rather the Canvas URL(http://appifylabs.com/facebook/yourapp/processform.php)
e.g
if processform.php is the script that will manipulate your form so give the value
site_url = "www.example.com/";
action="<?php echo site_url; ?>processform.php"

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.

facebook sharer og:url content not displayed after share

I have set the meta tags as shown in the example
Everything works fine, except the og:url tag. Before i hit the share button, it's displaying the correct url as set in the tag. But after I hit the share button, the shared message display the domain name of the site instead. So for example if I set the og:url as www.helloworld.com/hellouniverse, the shared message (this can be seen after i hit share) will instead display www.helloworld.com.
Does anyone probably have any idea how to fix this ?
Thanks
As far as I know, this is the default behavior of facebook, they take the domain name from the og:url parameter and display it.
I've tried several approaches to deal with it, but eventually came up with nothing.
Because it is their internal script, there isn't much you can do about it.