I am trying to add a few social media share buttons to a Wordpress site I am working on and am using this for Facebook:
<img src="/img/facebook-blue.png" alt="Share this on facebook!" />
but it is not seeming to work, it produces the correct link when I inspect the code "http://www.facebook.com/sharer/sharer.php?u=http://myurl/post-name" but when I click it I get this error on Facebook:
I'm working locally, the url is: localhost:8080/videos/test-2-testing
You'll find Facebook's sharer.php won't work with any localhost URLs.
The sharer scrapes an image, title, and description from the URL it's passed. As it can't access localhost (and allowing it to try actually would create potential security holes for Facebook), you get this error.
It'll likely work just fine in production, although you'll want to urlencode the URL, like this:
<a href="http://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode(get_permalink()) ?>" ...>
In Your WordPress Admin Area, select Plugins > Add New from the menu.
Search for “ShareThis”
Install the “ShareThis: Share Buttons and Sharing Analytics” plugin.
Activate the Plugin.
This plugin can give you a facebook share button at the bottom and other buttons as well. This is what I use without having to write the code myself.
Related
This is kind of a follow up question to my last post.
I've installed a WordPress site locally on my laptop and now, after some initital problems, I can finally access that site from my PC in the same local network. At first it did not display CSS, only HTML, so I changed the WordPress address (URL) to http://my-host-ip/my-website, which worked just fine.
But now, when I login, the Ultimate Member Profile won't show, I think because it is still trying to call localhost. Even in the WordPress admin Firefox is trying to reach localhost. And when I view the sites source I get calls like:
<meta property="og:image" content="http://localhost/hp1/wp-content/plugins/ultimate-member/assets/img/default_avatar.jpg"/>
or
</span><img onerror="this.src='http://localhost/hp1/wp-content/plugins/ultimate-member/assets/img/default_avatar.jpg';" src="http://localhost/hp1/wp-content/plugins/ultimate-member/assets/img/default_avatar.jpg" class="func-um_user gravatar avatar avatar-100 um-avatar um-avatar-default" width="100" height="100" alt="Erika Musterfrau" /></a>
I would greatly appreciate any ideas on how to fix that. Thanks in advance!
This is old link that exists in your sql db , You should search and replace all these links with the new urls matching to your current website url , I Prefer using SEARCH-REPLACE-DB-MASTER tool , But don't forget to delete it right after its usage , Plus also you may find some broken links "posts/pages" , Don't worry , This just need you to open your dashboard "Settings - Permalinks - Save" so that you reset your permalinks , Here is the tool and its documentation . https://interconnectit.com/products/search-and-replace-for-wordpress-databases/.
I want whenever users open my wordpress website a popup window appears that displays Video(from youtube/ vimeo) and user have a option to whether click on play button to watch video on same popup screen or just cross that pop up to visit website, Kindly suggest me some wordpress plugin or any other solution that solves this issue
Also i used plugin "Popup with fancybox" but it didn’t work fine , instead of previewing the video it displays the link of that video (attached the image )http://i.stack.imgur.com/OHyq6.jpg
Kindly Help me, Thanks In advance
It seems as though you are using a shortcode for 'popup with fancybox' which includes another shortcode for the embedded video. So you have a shortcode within a shortcode or something like that.
You might have better luck using a different plugin such as: http://wordpress.org/plugins/wp-video-lightbox/installation/. It seems to do exactly what you want.
I want a facebook fan page with something like this:
With new design/theme, matching to my new website (orange/black)
Custom Logo/contents display
30 boxes short description, on mouse hover, get some highlight for box and on click of specific box, opens a new pop-up
pop-up should contain more detailed description and a link to specific page on my website
I think above things are achievable using FBML but any good ref/guide would be appreciated to help me quickly develop such a thing.
FBML is being deprecated by Facebook. You can create an iframe application instead. In an iframe you can basiclly do anything you like. As for themeing the page, you can't touch the facebook design. You can only control the contents of the iframe itself. You can however upload an image for the "profile picture".
Here is a guide for iframe apps for your reference:
http://www.hyperarts.com/blog/adding-iframe-application-to-facebook-fan-page/
Here is the reference site where you find the full demonstration of custom FB fan page.
You can achieve that using fb api.
http://www.kimwoodbridge.com/how-to-create-a-custom-facebook-fan-page/
http://blog.theunical.com/facebook-integration/simple-steps-to-publish-on-facebook-fan-page-using-php/
http://www.webdigi.co.uk/blog/2010/creating-a-custom-facebook-page/
i need to use share button in my website. Different share button for different products.. mostly we need to use like this,
http://www.facebook.com/sharer.php?
In the above url what are all the parameters we need to pass for showing it as our website, product and some image of that product in that share page...
You asked what parameters you need to pass it to have it show up as your site, etc. The like button uses its own Graph Protocol API to do this, it essentially makes your page a facebook page and can be read as such. It's written like XML and defines things such as the thumbnail you want to show as your picture, the shortname of the site, etc. Go to developers.facebook.com to read all about the facebook API and app development and integrating into your webpage, etc.
you cand use this on github to share content on social media (includes facebook) and make your custom button!
You can use Facebook Like also. It performs the same as the Facebook share now appearing in your Facebook newsfeed with thumbnail, or
You can use some plugins like add this or you can use the following link:
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
I am using Share on Facebook button with www.facebook.com/sharer.php?etc URI. However, I have some problems. Here's what I want to do.
My site is kind of like a blog in which each blog has a lot of photos
So when people click on Share on Facebook button, I want the users to be able to choose which photo to use as Facebook thumbnail. I'm aware this is the default method of Facebook Share which is to scan the whole page for images.
However, my problem is the thumbnails won't show. I viewed the source to find that the URI to the images is incorrect. For example :
**SHOULD BE :** http://www.mysite.com/web/images/photo.jpg
**ACTUAL :** http://www.mysite.com/images/photo.jpg
So in short, facebook fails to read the "web" in the URI. That's why the thumbnail won't show. Any idea how to fix this?
The link to the site :
http://www.biiiz.com/nya/blog.php?id=1
It's actually just a temporary hosting. 'm sure the share on FB will work fine when I move the files into their own hosting, but I'm just curious about this.
You can get facebook to clear their cache and re-download your meta data by entering your URL into their linter:
http://developers.facebook.com/tools/lint/
Consider the documentation
`<link rel="image_src" href="thumbnail_image" / >`
FB caches for... like... ever. You can't clear it manually, so just wait until their private crawler hits your site again.