Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't see facebook "like" button when working from a localhost #142

Open
jofus101 opened this issue Nov 19, 2013 · 2 comments
Open

Can't see facebook "like" button when working from a localhost #142

jofus101 opened this issue Nov 19, 2013 · 2 comments

Comments

@jofus101
Copy link

Facebook doesn't seem to work with localhost requests.

"It is possible to perform limited testing on the facebook like button on localhost. It renders properly on my machine. The trick is using a live, non-localhost URL on the data-href attribute (I used Google in the sample below):"

Changing the "data-href" part of \app\views\shared_share_buttons.html.erb:ln2

<div class="like">
<div class="fb-like" data-href="<%= url_for campaign_home_url(@campaign) %>" data-send="false" data-layout="button_count" data-width="70" data-show-faces="false"></div>
</div>

to

<div class="like">
<div class="fb-like" data-href="http://www.google.com" data-send="false" data-layout="button_count" data-width="70" data-show-faces="false">
</div>
</div>

Or any other valid url allows the like button to show up.

@mattlebel
Copy link
Contributor

@jofus101

If you include your Facebook App ID in the admin panel under website settings, you should not run into this issue.

screen shot 2013-11-20 at 3 03 52 pm

If you need a Facebook app ID, you can get one by visiting developers.facebook.com and registering a new app. Note that you will need to disable sandbox mode on the application before the like button will appear on your Crowdhoster campaign page.

@jofus101
Copy link
Author

Neither of those steps were true for me. My facebook app wasn't in sandbox mode, and I had added the facebook app id in the admin panel. The issue seemed to be the localhost url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants