facebook like button won't "like" - html

So what's strange is that the like buttons on my site will only work IF the like button has already been liked in the past. If there are no current likes, such as on this page:
http://www.narutomeetsbleach.com/naruto-shippuden-219.html
Then you can click like all you want, but you won't actually like anything. Does anyone know what's wrong? I got my like HTML directly from facebook and it's the exact same as the like buttons that are working.
Thanks so much!

You can use the Facebook LINT tool. It actually checks you meta tags and will point you in some direction what your problem is. (Check link below.. I have added a ?v=1 to the html page to avoid facebook server error response)
http://developers.facebook.com/tools/lint/?url=http%3A%2F%2Fwww.narutomeetsbleach.com%2Fnaruto-shippuden-219.html%3Fv%3D1
Type in your url and check your page.
Try changing your code to the following (is there a reason why you are using the appId/fbAsyncInit methods?):
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.narutomeetsbleach.com/naruto-shippuden-219.html?v=2" send="false" layout="button_count" width="450" show_faces="false" font="tahoma"></fb:like>
AND / OR
Use this link to generate your LIKE BUTTON Code
http://developers.facebook.com/docs/reference/plugins/like/
Generated Like Button Code (Iframe) :
<iframe src="http://www.facebook.com/plugins/like.php?app_id=137084976372144&href=http%3A%2F%2Fwww.narutomeetsbleach.com%2Fnaruto-shippuden-219.html%3Fv%3D3&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>

Found it out! I had to remove the og:type meta tag. Found someone else on google who had a similar problem, that's what he did and now it seems to be working fine for me after I re-linted the url. Facebook's giving me a "warning" because I have og:type missing, but now it's working, so I guess that's all that matters. Thanks for all the help!
reference: Facebook "Like" produces "There was an internal error when updating the Page."

The Facebook button and all it's code comes from them and it's within an iframe with source from their server... you'll have little control over how that works. As long as you got your App ID and such entered correctly... otherwise, you're at their mercy.
Yes, even though it's just a "Like" button, you still need an App ID (appid). More detailed info below...
See the accepted answer to this: "Do I need an appid for the XFBML version of the Facebook Like button?"
And quoting this page, http://developers.facebook.com/docs/guides/web/:
"The JavaScript SDK requires that you register your website with Facebook to get an App ID (or appId). The appId is a unique identifier for your site that ensures that we have the right level of security in place between the user and your website. The following example shows how to load the JavaScript SDK once you have your appId:"

Related

How to pass a field from a Wordpress plugin into an iframe

I have just installed Paid memberships Pro plugin and I want to pass a field into an iframe. Below is one of a number of attempts and what the subsequent source code looks like. I don't know if the issue is being caused by the fact that the PMP field also requires quotes or I am getting the syntax wrong. I have tried with quotes in the correct place (I think) see below:
<iframe src="https://www.************.com/assessment/****?email=[pmpro_member field=‘user_email']&fname=[pmpro_member field=‘first_name']&lname=[pmpro_member field=‘last_name']" style="width:100%; height:1000px;"></iframe>
I don't seem to be able to find any examples of anyone doing this (maybe you can't)?
If I put the PMP shortcode ([pmpro_member field="user_email”] directly into the HTML on a page then it picks up the correct email so I know this works. I can’t get it to pass this into the iframe though. I’m new to all this so any pointers would be appreciated.
HTML in WP page:
<iframe src='https://www.****************.com/assessment/****?email=[pmpro_member field="user_email”]' style="width:100%; height:1000px;"></iframe>
Source code:
<p><iframe src='https://www.************.com/assessment/****?email=[pmpro_member field="user_email”]' style="width:100%; height:1000px;"></iframe></p>
Hi I have managed to resolve this issue by using the 'advanced iframe pro' plugin (paid version). This allows you to take fields from the users profile and pass them into the iframe on another URL. Here is the HTML I used:
[advanced_iframe src="//www.***************.com/assessment/****?fname={usermeta-first_name}&lname={usermeta-last_name}&email={usermeta-nickname}" width="100%" height=1100px"]
This picks up the first and last name and nickname.
assuming you use it in the code, you will need to use the wp function do_shortcode
<iframe src="https://www.****************.com/assessment/****?email=<?php echo do_shortcode( '[pmpro_member field="user_email”]' ); ?>" style="width:100%; height:1000px;"></iframe>
if you use the editer you will need to enable shortcodes in iframe tag
look here for more info https://codex.wordpress.org/Function_Reference/wp_kses_allowed_html

FB Share without App ID

Is it possible to use FB share plugin without APP ID?
If I use HTML5 code then the console logs an error FB.getLoginStatus() called before calling FB.init().
To use HTML 5 FB like is it necessary to have an APP ID?
Thank you
Here i am sharing what i did to share post on fb wall, In this way you do not need to use appId. Just put this code in your HTML page where you want link to share...
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u={$url}&media={$imgPath}&description={$desc}" class="joinFB">Share Your Advertise</a>
URL parameters are as explained below,
u : url or link you want to user to go when he clicks on your wall post,
media : full image path,make sure that image is available on given path,it will accept one image only
description : a short description that you want to show on wall
It will also ask you to write some data which will be displayed above your post. Description passed in url will be displayed in right side of your image.
Please note that i had passed $url,$desc,$imgPath variables as per my need. The above code is in smarty-php, so change it as per your requirement.
Hope this becomes helpful to you.
Yes you need an app id. You can try to inject your own code into the DOM of the user when using facebook and call functions in their javascript... But I doubt many users will actiually use an "app" that works this way.

Auto-generated facebook comments boxes

I´m implementing facebook comments boxes on my news pages. And it works. The problem is that if I make a comment on one page, it will display on ALL pages which contains fb comment boxes.
Currently my code looks like this:
<b><div class="fb-comments" data-href="http://selandia-ceu.dk/selandia/nyheder.aspx" data-num-posts="3" data-width="500"></div>
<script>
var fb-comments = document.getElementById('fb-comments');
mydiv.innerHTML =
'<div class="fb-comments" data-href="' + document.location.href + '" data-num-posts="3" data-width="500"></fb:comments>';
FB.XFBML.parse(fb-comments);
</script></b>
The website is using Microsoft Server. The url in the code is supposed to refer to the current page one is viewing. Anyone know what I´m supposed to do? :)
The comments are temporary disabled on the pages.
I got the extra bit of code (FB.XFBML.parse) from this thread:
Different Facebook comment box after each ajax call
You may need to clean up your Open Graph tags, as the URL that each comments plugin is pointed to will be scraped by the Open Graph linter and used to determine the canonical URL. The problem is likely that your comments plugins all end up pointing to the same canonical URL:
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fselandia-ceu.dk%2Fselandia%2Fnyheder.aspx
Use this Debug tool to inspect your Open Graph tags and ensure each page has it's own canonical URL. You also need to correct the fb:admins tag that you have in your HTML as suggested by the debugger.

Facebook send message puts in wrong URL

We are trying to use either the facebook send social plugin, or the fb.ui send dialog. In both cases, we have found the link or href we pass to facebook only mostly works. There are 3 places a link is placed in the message and they are:
The title of the message
A link right below the title
an image to the left of the description
1 and 3 seem to respect the link parameter, but 2 is not. Here is an example of the code we are using:
FB.ui({
method: 'send',
name: 'Referral',
link: 'https://www.oursite.com/?refer=123',
picture: 'http://www.oursite.com/assets/images/logo.png',
name:'heres a name',
description:'description'
});
When this gets sent the link https://www.oursite.com/?refer=123 works for the name and the picture, but not the link output right below the name. Here is the code we're using for the social plugin which yields the same effect:
<div class="fb-send" data-href="https://www.oursite.com/?refer=123"></div>
This happens because Facebook doesn't use your link parameter: it uses the og:url meta of the page you want to share.
If you use the fb-send plugin, you can have a look to the data-ref attribute : it should do the job :)
You should also have a look here: https://developers.facebook.com/tools/debug to know what URL Facebook will use at the end.
Good luck

app_id parameter in like button iframe code

I have a question about a parameter I see in the iframe URL when I generate the code for the like button. https://developers.facebook.com/docs/reference/plugins/like/
When I copy the iframe code, I see something like:
<iframe src="http://www.facebook.com/plugins/like.php?
app_id=1234567890&href&send=false&layout=standard&width=300&
show_faces=true&action=like&colorscheme=light&font&height=80"
scrolling="no" frameborder="0" style="border:none; overflow:hidden;
width:300px; height:80px;" allowTransparency="true"></iframe>
The meaning of all these parameters is clear to me, except "app_id".
What application is that?
I didn't specify any URL in the code, so why is Facebook giving me a new app_id?
Wasn't the app_id parameter supposed to be included in the OpenGraph tags?
Thanks in advance
Here is what I found upon investigation:
When you generate a Like button (ie, click the "get code" button), a new Facebook application is created called "Unnamed App" and tied to your developer account.
This is undocumented and new behavior. We may be seeing the result of some un-announced Facebook Platform feature/policy. Keep your eye on F8 for possible details.
what you are coping should be the xfbml version of the like button and that require javaScript SDK.
And in order to initializee JavaScript SDK, you need to register an facebook app.
app_id is part of the information of the app that u can obtained from your registered app