I'm using the facebook social plugin with an embedded ruby url which references: http://www.facebook.com/pages/my_page/my_page_id Specifically, the like button functionality works, but the send button functionality results in an error.
<div class="fb-like" data-href='<%= #fb_url %>' data-send="true" data-colorscheme="dark" data-width="450" data-show-faces="true"></div>
The page at http://www.facebook.com/pages/my_page/my_page_id could
not be reached because the server returned status code 200.
Have you ever seen this? This doesn't even make sense: a status code 200 is - OK.
Solved the problem:
This is related to URLs that redirect. The like button supports them, the share button does not.
Related
I am trying to use facebook share button to my wordpress theme. I have use this code for that
<div class="fb-share-button btn btn-default" data-href="<?php the_permalink(); ?>" data-type="button_count"></div>
It is showing the share button. You can check the result here http://www.racecarwow.com/crazy-crash-v2-0/ . But my goal is , the share button will be look like the share button of this site http://blog.petflow.com/bravo-heroic-little-girl-saves-a-trapped-puppys-life/ .
I think, http://lipis.github.io/bootstrap-social/ will be a good solution for me. But i could not understand how can i use <div class="fb-share-button btn btn-default" data-href="<?php the_permalink(); ?>" data-type="button_count"></div> to that button. Please help me.
Yes ! i have got the solution by combining following the two site
http://ostr.io/code/html-social-like-share-buttons-no-javascript.html
http://lipis.github.io/bootstrap-social/
Hope it will be helpful for other person.
Well, it appears, that you have a slight mistake in your code, there is no function like the_parmalink() in Wordpress so far, but the correct one is the_permalink().
This function retrieves the permanent link to the post currently being processed in The Loop (as you can guess from it's name).
This tag must be within The Loop, and is generally used to display the permanent link for each post, when the posts are being displayed. Since this template tag is limited to displaying the permalink for the post that is being processed, you cannot use it to display the permalink to an arbitrary post on your web site.
Refer to get_permalink() if you want to get the permanent link for a post, given its unique post id.
So fix your code and try again:
<div class="fb-share-button btn btn-default" data-href="<?php the_permalink();?>" data-type="button_count"></div>
I am using facebook button tag (http://developers.facebook.com/docs/reference/plugins/like/) and used this tag
<fb:like href="http://developers.facebook.com/docs/reference/plugins/like/" send="false" show_faces="false" ></fb:like>
But it is showing me more than I asked for. It works fine in firefox but it shows some extra information on safari. How can I get rid of that signup link?
AS Scott indicated I think this is working as designed. When in Firefox you are likely signed into facebook - hence the like button displays as you want it to display. But when you are in Safari you are NOT logged in (there's no facebook cookie - probably because you use FF as your default browser). So you get the info and the signup button.
As for the "extra" information you should experiment with
type="box_count"
and or
type="button_count"
The default is "standard" - so perhaps one of the other types will be more suited to your layout.
if you aren't connected to Facebook, you will always see the Sign Up button, if you don't Want show the Sign Up link, you can use a div container with Overflow:hidden property
<div class="containerLike">
<fb:like href="http://developers.facebook.com/docs/reference/plugins/like/" send="false" show_faces="false" ></fb:like>
</div>
and in css:
.containerLike {overflow:hidden;
width: Your selected width;}
I am using the iframe method to get the Facebook Like Box on my website.
The website is: http://motorcyclealley.co.nz (the Like Box should be showing down the bottom to the right of the YouTube video)
However, it is always blank.
Browsing to the iframe url in my browser: http://www.facebook.com/plugins/likebox.php?href=http://www.facebook.com/MotorcycleAlley&width=320&height=315&show_faces=false&colorscheme=light&stream=true&border_color&header=false&appId=397375460320824
Also produces a blank screen. The url was generated with the official generator. I am unable to figure out what is wrong because STRANGELY it works in the browser I originally did it on (Firefox 18.0.2 on Linux).
I have tried it on Chrome, Internet Explorer and Firefox/Windows and made sure that all adblocking extensions are disabled. I still get the blank screen.
Can anyone tell me whats going on?
EDIT: I should also mention that I have tried the HTML5 and FBML methods with the same result, they both worked on that ONE browser but not on any others
Ok, I just found out why. The Like Box doesnt show unless you're logged into Facebook in that browser (because it is set to have an age restriction). Apparently the following fixes it: https://stackoverflow.com/a/9310091/335227
I had the same problem.
I followed FB's instruction to add a FB like box in my web page:
<div class="fb-like"
data-href="https://www.your-domain.com/your-page.html"
data-width=""
data-layout="standard"
data-action="like"
data-size="small"
data-share="true">
</div>
But the block doesn't show like and share buttons, only white blank.
After some investigation I found it to be a bug of standard layout, if I set data-layout attribute to box_count, button_count or button, it works well.
My research
When I click my Like button, it does add the activity to my FB (per screenshot) but the count stays at zero (also per screenshot), why?
I've checked the Linter tool and everything looks to be fine.
The site is www.FindCuro.com
Here is my code (MVC)
<script src="http://connect.facebook.net/en_US/all.js#appId=#ConfigurationManager.AppSettings["FacebookAppId"]&xfbml=1" type="text/javascript"></script>
<div id="fb-root"></div>
<div class="fb-like" data-href="http://www.findcuro.com" data-send="false" data-width="450" data-show-faces="true" data-layout="button_count"></div>
Thanks
The problem is the like button.
<div class="fb-like" data-href="http://www.FindCuro.com" data-send="false" data-width="450" data-show-faces="false" data-layout="button_count"></div>
You shouldn't be using "FindCuro.com" (note the capital letters)
If you check https://graph.facebook.com/http://www.FindCuro.com/ you'll see two shares
If you check https://graph.facebook.com/http://www.findcuro.com/ you won't see any shares
Facebook is checking the second one.
try all lowercases.
The issue is related to the fact that page located on URL you using for like button have Canonical URL that cannot be resolved due to cyclical redirects: http://www.FindCuro.com/ (See output of Debug tool for initial URL and the one for Canonical URL)
Provide lowercase Canonical URL in the OpenGraph meta tags should solve the issue.
BTW, If you'll use standard layout for Like Button you will probably see error message while liking with user who is admin of application. Also activity story about liking page is sent regardless of real like number increase.
I'm trying to use Jquery Mobile for a web-app, and depending on what button the user clicks, redirect them to a new web page.
Example:
A user visits foo.com/index.php.
When they click login it takes them to foo.com/login.php.
That much I've been able to figure out using:
<a class="ui-block-a" data-role="button" type="submit" onclick="window.location.replace('./login.php');">Login</a>`
When I try setting href to "./login.php", it sends me to foo.com/#./login.php.
That is all well and good, but the web browser is really going to:
foo.com/index.php
foo.com/index.php#undefined
foo.com/login.php
which is causing a problem because the user has to click the back button twice.
How can I send the user from index.php to login.php without the browser trying to go to #undefined first?
I also tried:
<a class="ui-block-a" data-role="button" type="submit" onclick="window.location.replace('./login.php');" href="">Login</a>
but it still sends the viewer to foo.com/index.php# before redirecting properly.
<a href="javascript:location.replace('./login.php');" class="ui-block-a" data-role="button" type="submit" >Login</a>
Also, have you considered just simply linking to the page normally but with an attribute of rel="external" ?
try making it window.location.replace('login.php');
or window.location.replace('/login.php');