I posted a question on stackoverflow and I haven't received any answers yet. maybe you can help me....
This is the problem:
Like buttons on my page that suppose to give "like" to different comments by their different 'href' given, raise the like count to all like buttons.
Link to my website page:
http://petbuy.co.il/ProductCard.aspx?product_id=7873&friend_Id=1000
look at the bottom of the page and try to "like" one of the comments and then refresh the page.. If you use a developer tool, you can see that every button iframe gets a different href... The "friend_id" param changes in each button href..
BUT !
If you look at the console log, you see that the response for this request of clicking the like button, uses only the first param of the url:
The href is:
http://petbuy.co.il/ProductCard.aspx?product_id=7873&friend_Id=1000
And it uses only the product_id=7873 without the friend_Id=1000.
I tried to switch the params, and this time it took only the friend_Id=1000".. I need them both :((
Thanks!!
Make sure you add the following Open Graph Metatag:
<meta property="og:url" content="http://petbuy.co.il/ProductCard.aspx?product_id=7873&friend_Id=1000" />
I did not find that tag at all in the code, it should be on EVERY page and it needs to match the URL.
Also make sure the URL is encoded correctly, see here: Encode URL in JavaScript?
...and i assume Server.URLEncode in ASP.
And always use the generator: https://developers.facebook.com/docs/plugins/like-button
It will show you exactly how the URL needs to show up in the code.
You need two diffrent urls for the like button
<div class="fb-like" data-href="http://petbuy.co.il/ProductCard.aspx?product_id=7873&friend_Id=2000" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
and
<div class="fb-like" data-href="http://petbuy.co.il/ProductCard.aspx?product_id=7873&friend_Id=1000" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
The Meta og:url is correct and describs the url of the page..
Related
in my website http://youmark.it/ I have in the home page post and in all other single post pages the same number of like, also the send button once you click is showing the Facebook Page url and not the Post url.
I have integrated all stuff for open graph, if you look at the source code it seems to be ok but still doesn't work after few changes I did. Also in the Facebook Debug tool everything shows correct.
Does Facebook need time to get updated or am I doing something wrong?
You have all your like buttons “pointing” to the base URL of your website.
If you want them to like the individual article, then include the URL to that article in the href parameter of the <fb:like> tag.
Try to like this url: <?php the_permalink() ?> instead?
<iframe src="//www.facebook.com/plugins/like.php?href=<?php the_permalink() ?>&send=...
???
I have an blog with related posts image in the top of it. I was waiting for something to fix it since they launch it, but didn't find anything yet so I'm asking for help with it.
The question is. When someone share an post with +1 button, it get the first image of the URL, which usually is one of the featured posts thumbnail.
In Facebook Share I got an plugin that get the 'featured image', but as far I researched, didn't find anyway to make it possible with G+.
So, one of the solutions I considered is making the "Featured post thumbnails" div 'hidden' to G+ button. Is it possible? Or make something similar?
You need to specify the +Snippet values. In the case where a post has no image make sure you keep the image definition but use the blog logo instead.
<body itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">Shiny Trinket</h1>
<img itemprop="image" src="image-url"></img>
<p itemprop="description">Shiny trinkets are shiny.</p>
</body>
In addition to Abraham's way, you can specify the og: meta data tags in the <head> section of your blog posts. See http://ogp.me for more information about the og: meta tags. The one you need is <og:image />.
IIRC, Wordpress has plugins that allow you to specify og tags.
We have a Wordpress site that uses a plugin to place Open Graph tags on our content. We receive the following error when using the FB linter:
Response Code: 200
Fetched URL: facecrooks[dot]com/
Canonical URL: facecrooks[dot]com/
Errors That Must Be Fixed
Body Meta: You have meta tags outside of your head. This is either because your head was malformed and they fell lower in the parse tree, or you accidentally put your Open Graph tags in the wrong place. Either way you need to fix it before the tags are usable.
We have not been able to locate any meta tags outside of the header.
Also, when we post an item from our website to our Facebook page a random image is selected instead of the one defined in the OG. Usually the image selected is a 125x125 ad from our right column.
You can verify that the Open Graph Tags are active on the site by visiting http://facecrooks.com and then view source.
Any idea on how to fix these errors would be greatly appreciated!
Maybe facebook's linter doesn't like the HTML div tags in the head section...
<noscript>
<div style="display:none;">
<img src="//pixel.quantserve.com/pixel/p-74ksBYx3WjrXU.gif" border="0" height="1" width="1" alt="Quantcast"/>
</div>
</noscript>
So I'm trying to debug a somewhat confusing problem. I'm using a Wordpress plugin for a Topspin store that uses colorbox to popup a window to display more information about an item. Here's the site: okgo.net/store. In the backend code for this page a div block is created containing links that that should look like this:
<a class="topspin-view-item" href="#!/77022">
The php that does that is as follows:
<a class="topspin-view-item" href="#!/<?php echo $item['id']; ?>">
The problem is that what is being spat out at the end is not that. It looks like this:
<a class="topspin-view-item" href="http://okgo.net/video-store/#!/89712">
I've understood from another post on here that the default behavior of Wordpress is to fill empty hrefs (ie href="") with the site url. So my guess is that Wordpress is for some reason interpreting this as an empty href? Except that that doesn't seem quite right either.
I've played around with this a bit. One thing that happens is that if I remove the has from the above PHP the siteurl is not output at all. That of course breaks my code.
Any ideas? Any help would be warmly appreciated.
The way we ended up fixing this for those who may be interested is by simply adding the following line of code to the jQuery handler that dealt with the on submit event:
event.preventDefault()
Perhaps this will be of help to someone...
I'm making a site which has a list of videos. Next to each video in the list I want a like button. My like button code looks like this:
<div class="fb-like" data-send="true" data-layout="button_count" data-width="100" data-show-faces="false"></div>
And the URL of the page is
http://dev2-rs-www.doubledip.com/video-play/?vid=aj5pbnNlcnRlZC1mcm9tLXRleHQtaW4tYnVpbGQtZGVwbG95LWFwcGxpY2F0aW9uaWQtb24tZGVwbG95bWVudHIkCxINQWNjb3VudFJlY29yZBgBDAsSC1ZpZGVvUmVjb3JkGAkM
However, the link on my wall is http://dev2-rs-www.doubledip.com/video-play/ without the ?vid= parameter. I also tried adding the data-href attribute, but that didn't do anything. How can I fix this?
Your problem lies with the misuse of the <link rel='canonical'> element. On the video page, it links to the page without the ?vid parameter, causing it to use that as the final value. Change it to the actual page and it should work fine.
Facebook like buttons doesnt use parameters in url.
User this: http://developers.facebook.com/tools/lint/
to check for info and errors