Facebook like button, locale not working - facebook

The user can change language on my webpage and I wish to change the text of the fb like button according to the current language. I use the iframe method and have read the documentation from fb but this is not working:
<iframe
src='http://www.facebook.com/plugins/like.php?locale=en-US&href=http%3A%2F%2Fwww.example.com&layout=button_count&show_faces=false&width=80&action=recommend&colorscheme=light&height=10'
scrolling='no' frameborder='0'
style='border:none; overflow:hidden;
width:80px; height:80px;'
allowTransparency='true'></iframe>
I have set html lang='en-US' and locale=en-US in the src above but still the text display in my windows locale language.
What am I doing wrong?

If i remember right it (the locale= in the iframe address) should be en_US not en-US.
-michael

You can find a complete listing of all the locales supported by Facebook here:
http://www.facebook.com/translations/FacebookLocales.xml
Good luck!

Related

Add Like Button to website

I am trying to install the like button on my website but cannot get it to appear on the website.I have tried everything but no joy. I have pasted the codes etc. etc but nothing. I use Serif Webplus X2 for web design.
I added the code to a html text box and after uploading to the web only the code print appears on the website but no button. However if I use the Facebook Platform code it works??
I had the same problem, i found interesting information on this website
http://www.webmonkey.com/2010/04/adding-facebook-like-buttons-to-your-site-is-damn-easy/
More easy, Facebook generate the code for the button "I like" for any website.
http://developers.facebook.com/docs/reference/plugins/like/
Add the below HTML code on any page:
<iframe
src="https://www.facebook.com/plugins/like.php?href=http://www.facebook.com/NiraTechTraining?ref=ts&fref=ts"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px">
</iframe>
Get Your Code Here: http://developers.facebook.com/docs/reference/plugins/like/
The easiest way is to use a "iframe".
Make a HTML block and paste it into the body (Click the 'Paste to Body' Button on top right)
If it doesn't work in your preview, you have to Host it.
If you are willing to upgrade, Serif WebPlus X6 and later versions include support for Facebook Like buttons. In X6, go to Insert->Social Media->Facebook Widget and select 'Like Button' from the drop-down.

Comment to url API

I am using Facebook Comments plugin in my website:
http://developers.facebook.com/docs/reference/plugins/comments/
by add this to my web :
<div class="fb-comments" data-href="http://example.com" data-num-posts="2" data-width="470"></div>
And i want to use it also in my android app, Can i use Facebook API or something else that i can make a comment on a URL without using the Comment plug-in.
Its impossible but comment plugin will show mobile version automatically for mobile devices
The mobile version will automatically show up when a mobile device
user agent is detected. You can turn this behavior off by setting the
mobile parameter to false. Please note: the mobile version ignores the
width parameter, and instead has a fluid width of 100% in order to
resize well in portrait/landscape switching situations. You may need
to adjust your CSS for your mobile site to take advantage of this
behavior. If preferred, you can still control the width via a
container element.
You can use the Graph API with stream_publish permission from the user in order to publish comments on their behalf. You can read the following docs to see how that works:
https://developers.facebook.com/docs/reference/api/post/#comments

fb like button shows allways as locale en_US

I am using the XFBML Facebook like button on my german website.
The locales were changed to de_DE to display "Gefällt mir" and it worked for some days.
But now it is ignoring the locales and everybody sees "Like".
I can not figure out why it has changed.
The used code is the same as before.
The used web server is located in germany.
My facebook account is set to german language.
What else could have an effect?
I have found my mistake...
My CMS also uses the possibility to login using a FB account.
For that it loads the javascript sdk again in the footer of the page.
This version was set to en_US!
which version of the javascript sdk u are loading in your page that contains the like button?
make sure you are loading the de_DE version

Adding a Google Plus (one or share) link to an email newsletter

I am trying to find a way to embed a share/+1 link for Google+ in a Newsletter, much like the Facebook share and tweeter tweet links can be embedded in a newsletter, which can be achieved with the following two urls:
https://www.facebook.com/sharer.php?u=[URL]&t=[TEXT]
http://twitter.com/intent/tweet?source=sharethiscom&text=[TEXT]&url=[URL]
Is there a similar functionality available for Google Plus?
All I could find on my own, is the Google+ button, which unfortunately uses JavaScript and thus it cannot be used in an email newsletter. I would expect Google to provide a static url fallback, but I cannot find it anywhere.
https://plus.google.com/share?url=http%3A%2F%2Fexample.com
You can share the link on Google+ with the official Google+ share link.
Replace the url parameter with the URL encoded link you want to share.
This one works fine for me :
https://plus.google.com/share?url=your-page-url
The share link allows you to do this. It will work in an email, but it's not quite the same as the +1 button.
To use the share link, add a link element to your email that complies with the Google+ Buttons policy. Set the href attribute to https://plus.google.com/share?url={url encoded share target}
For example, linking to https://plus.google.com/share?url=http%3A%2F%2Fexample.com will allow you to share example.com on Google+: (yes, that is a working demo).
Check out the official docs for more info.
If you use this approach please be aware of the fact that it is not a direct replacement for the +1 button. The link shares the target URL on Google+, but it does not actually +1 the target page. Only the +1 button can +1 a page.
Solution for those who needs custom title, description and image. You should make following changes to target URL:
Step1. add itemscope itemtype="http://schema.org/LocalBusiness" into <html> tag. It will look like <html itemscope itemtype="http://schema.org/LocalBusiness">. More itemtypes here
Step2. Place the follwing meta tags into <head>, change content attributes according your needs:
<meta itemprop="name" content="{Custom title goes here}">
<meta itemprop="description" content="{Custom description goes here}">
<meta itemprop="image" content="{http://www.your_url.com/your_image.png}">
Step3. Add the following link to your newsletter or anywhere you want:
Share it
Tip. To check how google sees your page, you can use this tool http://www.google.com/webmasters/tools/richsnippets. Probably you'll be interested in section Extracted rich snippet data from the page
Good luck, Lauris
I'm using the following.. :)
https://m.google.com/app/plus/x/?v=compose&content=[TEXT]%20[URL]
I personally suggest Google Plus Interactive Posts button
https://developers.google.com/+/web/share/interactive
to use in your apps/websites.Here Google Plus allows many customizations to do according to the requirement. I have used it in my app. Its a better option than Share button.
Maybe this helps. It works (partially) for me.
http://www.stateofsearch.com/share-on-google-plus-any-website/
There has got to be a way to do this by hacking the +1 script.
If you are interested in just changing the apperance you should download and modify this to suit your requirements.
Then, add this to your css:
.Uu .KF {
background: url("your-replacement-image") no-repeat scroll -132px -21px transparent !important;
}
to override the Google icons. However, this is probably very unstable and subject to change.

Facebook like button "breaks" when logged in as page

I have a facebook 'Like' button on my page and it's working fine. But when the visitor is logged in as a 'Page' at facebook it includes a photo and breaks my design. I guess this is because Pages aren't allowed to like things.
I pretty much have an iframe like this: http://developers.facebook.com/docs/reference/plugins/like-box/
Any ideas of how I get rid of this image? Any way to alter the design, disable this "feature" or check if the user is logged in as a page (to hide the whole thing)?
Thanks
Edit:
Screenshot of the issue: i.imgur.com/gLa7Q.png
In the top one I'm logged in as a regular user and the bottom I'm "Using facebook as Page"
The code I'm using: <iframe class="facebook" src="http://www.facebook.com/plugins/like.php?href=<?=urlencode('http://www.mysite.com')?>&layout=standard&show_faces=false&width=210&action=like&colorscheme=light&height=45" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
You can use the 'overflow' element in your css to stop it breaking the design. This at least keeps the like box the same size whatever somebody is logged in to Facebook as.
1) Wrap your like box in a div and give it an id (in the HTML)
<div id="mylikebox"> Facebook like Box Code in here </div>
2) Add to CSS (adjust height and width if you need to)
#mylikebox {
height: 70px;
width: 210px;
overflow: hidden;
}
Let Me Know if it works out!
I just noticed the exact same issue. Seems a bug on FB's part, as they provide an insertion code for their like button that breaks under a particular but perfectly normal condition (i.e. signed in to FB as a page.) I would love a solution too. In the meantime the bug has prompted me to remove the FB like button altogether from my blog, which unfortunately seems to be the only solution at the moment.
I found this to be true on the facebook developers like box configuration page. Definitely a facebook bug.
The answer provided by Nathaniel works for me. I have all my social icons in a line: http://www.cg-its.com
By setting a div height of 30, and adding the overflow: hidden attribute, if someone is logged in as a page rather than personal account they can see part of the red box, and the 'switch' URL allowing them to log back in as personal.
It's not perfect, but for the amount of users it will affect it is a good fix.