Can't access WordPress wp-login.php from within Facebook app - facebook

I deleted WordPress and started afresh and even created another new app on Facebook but still the issue remains.
I have set up a Facebook app which points to my WordPress site.
All parts of the site work, except I cannot click the register or login buttons.
If I log in from outside Facebook and refresh the Facebook app/page then I appear logged in and can do what I want, including log out.
Any ideas please? Unfortunately, most Google searches think I am talking about third party Facebook connect plugins, which I'm not.
The page in question is here, which is just looking at www.costablancaclassifieds.com.

You can also do this without modifying any of the core code. Just put these 2 lines in your functions.php
remove_action( 'login_init', 'send_frame_options_header', 10, 0 ); // main site
remove_action( 'admin_init', 'send_frame_options_header', 10, 0 ); // admin

From what I can tell Brad, this seems to be less of a FB problem and more of a WP cookie issue. I tried framing your site in with an iframe and it reacted similarly to the problem you're experiencing. Looked around a bit and found others with similar problems; issue being that when you're serving a WP site to another domain via an iframe the cookies aren't able to be set properly.
Here's one forum topic I found: http://wordpress.org/support/topic/running-wordpress-in-an-iframe-cross-domains
It's not good news, but hopefully it helps you find a solution or at least get some level of closure. I'll try to think of a creative solution for your situation.

Thank you very much, Mike. I didn't know it was because of iFrames. Because of what you wrote I was able to change what I was searching for and then found, albeit perhaps not so desirable, a solution that now works. (Perhaps you could test on your end too?) I modified a few lines in the Wordpress code base:
open wp-includes/default-filters.php
find "frame"
you'll get two lines:
add_action( 'login_init', 'send_frame_options_header', 10, 0 );
add_action( 'admin_init', 'send_frame_options_header', 10, 0 );
comment those lines out, save and clear cache.

Related

Facebook registration cuts off (XFBML)

we offer our users the ability to use facebook to sign up on our site and until recently this was working fine.
Since 2 days ago (October 30th) we noticed our registrations using facebook significantly dropped (from around 50-100/day down to 1!) and when taking a look at the process we found that the registration was being cut off and only a small part was showing.
This is how it looks now: http://i.imgur.com/i4UCkAx.jpg
If I look at the source of the facebook iframe I can see the html tag has overflow set to hidden and if I disable this using Firebug everything looks as it should. But since this is on facebooks end there's nothing I can do about it to prevent it happening to our customers.
Has anyone else run in to this problem and found a solution?
The bug has been reported to facebook here: http://developers.facebook.com/bugs/471852109598483/

Facebook Comments sometimes not loading

I kindly ask you to advise why Facebook Comments sometimes do not appear on my site.
I use standard code generated from Facebook Developers site.
Please note that the Comments box is located under the colored frame. Usually, it appears after reloading the page. Real site examples:
http://wakemovies.com/?ND201206190204
http://wakemovies.com/?BL201206190157
If I recall correctly Facebook comments require a bit of customization to the dock-type they have special format.
You should add this line tou your dock type
xmlns:fb="http://www.facebook.com/2008/fbml"
One more thing you are overloading your page with Facebook like buttons. I think one is more than enough considering most people have sharing plugins installed int they browsers.
I solved this by adding a setTimeout with a delay of 1 second
example:
setTimeout(function() {
// Your Facebook Comments JavaScript Code Here
}, 1000);

Wordpress og:image shows up blank

I've been at this for almost 3 days straight and now I can't even think clearly anymore.
All I'm trying to do is to get my featured image thumbnail to appear when I paste the link in Facebook.
I'm using the Wordpress Facebook Open Graph protocol plugin which generates all the correct og meta properties.
My thumbnail images are 240x200px which respects the minimum requirements and also respects the 3:1 ratio
I've made sure there's no trailing slash at the end of my post URLs
When I use the Facebook Object Debugger, the only warning is in regards to my locale, but that shouldn't affect it.
Facebook appears to be pulling the right image, at least the URL is correct, but the image appears as a blank square
I've gone through pretty much every thread I could find in forums, but all the information available is about using the correct og tags, which I believe I'm already doing.
Thank you very very much for any help, I'm desperate!! :)
You can troubleshoot the OpenGraph meta tags with the Debugger https://developers.facebook.com/tools/debug - this can at least show if you're using the meta tags properly and if Facebook can 'read' the image.
I finally figured out that the root of my issue was the fact that I was using an addon domain (which is really a subdomain being redirected to the top level domain) and I read on eHow (of all places :) ) that Facebook has trouble pulling data from redirected domains.
Not sure if there was another way around it, but I simply ended up creating a seperate hosting account and everything is loading properly now.
one problem youre going to run into testing is that often the first time your page or post gets liked, fb keeps whatever img it finds in your meta tags or by searching your page. so, you'll keep changing your img meta tag and still it wont show the right pic. it's very anoying. One way to get around it is to change the slug of your post. now, it has a different url and to fb, it's a different page. The downside is you lose all the likes that go with your orig url. Not a problem with a new site.
I ended here googling another problem. Maybe this might help someone:
Please bear in mind that the facebook scraper works asynchronously and will need some time (during my tests around 10 minutes) to be able to display an image after seeing it for the first time.
For more information, here's a more thorough answer on a similar problem.
Indeed, as Andy Wibbels points out the FB debugger is a really handy tool.
I faced a similar issue with a server's og:image tag pointing to a secure subdomain which actually mirrors a CDN server,
<meta property="og:image" content="https://subdomain.pathToImage.jpg" />
<meta property="og:image_secure" content="https://subdomain.pathToImage.jpg" />
The FB debugging tool allows you to see the errors that FB encounters when trying to pull the image.
In my case the subdomain was not registered under the SSL certificate used by the HTTPS protocol. Hence FB was getting the following error,
Curl Error : SSL_CACERT SSL certificate problem: unable to get local issuer certificate

Facebook like button not working on recent wordpress blog posts

I have a facebook like button on each of my wordpress blog posts, this worked fine up until about 2 weeks ago, and now all recent blog posts don't have functioning like buttons.
This is the response I get when I click the like button (post link)
for (;;);{"__ar":1,"payload":{"requires_login":false,"success":false,"already_connected":false,"is_admin":false,"show_error":false,"error_info":null}}
and for the old blog posts that DO work (post link):
for (;;);{"__ar":1,"payload":{"requires_login":false,"error_info":null,"show_error":false,"node_type":"ExternalLink","node_id":"xxxxxxxxxxxxxxxxx","edge_type":"ExternalLinkLike","connect_text":0,"success":true,"already_connected":true,"user_profile":{"name":"xxxxxxx","profile_url":"http:\/\/www.facebook.com\/xxxxxxx","pic_square":"http:\/\/profile.ak.fbcdn.net\/hprofile-ak-snc4\/xxxxxx_xxxxxxxxx_xxxxxxx_x.jpg"},"story_fbid":"xxxxxxxxxxxxxxxxx","is_admin":false,"admin_url":""},"invalidate_cache":[0]}
I've tried replacing the like box code, removing the href attribute from the like box tag, running each link through Facebook URL Linter and none of this has worked!
I don't understand why it works for old blog posts and not new ones, there are no differences between them (that I know of).
This issue has nothing to do with your code. It is a FB issue I encounter on my websites as well. Did some research and came up with this:
this behavior is intermittent, may work on some pages, may fail on others
if you go on this page: http://developers.facebook.com/tools/lint/ and enter your url there, first time it will show up an error, afterwards the page will load. Hit some refreshes and afterwards the like button on your site (on the entered url) will suddenly start working... Very weird! I think it has something to do with FB crawler and (maybe) when accessing the lint tool you somehow force the crawler to recheck your page or something.
If anyone finds out something else, please share, the issue is really annoying...
Looking at the forums here:
http://forum.developers.facebook.net/viewforum.php?id=53
It looks like several other developers are running into the same issue. Some posts there also brought up having to use the lint tool to get their like buttons to work. I've also gotten it to work on my site by just mashing the Like button until it eventually accepts it so like what hpuiu said, i'm pretty confident that this problem's on their end.
Edit: And maybe on a related note, another post said that FB stopped scraping their site until they used the lint tool on their page and another said that they seem to consistently get this issue for any new posts that're around for less than 24 hours.
You could try to add the Iframe version of the like box instead of their javascript version. Sometimes it actually works better when loading multiple post for example.
Facebook doesn't like the '/' at the end of the url. So you can use something like this to omit the '/' at the end of the url :
$title = get_permalink();
<fb:like href="<?php echo substr($title, 0, -1); ?>" layout="button_count" width="300" show_faces="false"></fb:like>

How do you remove the "box head" in a Facebook application?

I'm currently developing a Facebook application which will eventually end up on a Facebook Page. The problem is that I don't know how to remove the box header (handle?) with the application name and the close-button.
I've seen other applications on Pages being able to remove the header. Look at Apples Page here: http://www.facebook.com/home.php#/pages/Apple-Students/11147074409
Is it because they use an IFrame? I've tried that as well but I still need to call setFBML and embed an IFrame inside it.
I think you're right about the IFrame in the Apple page. It looks like the entire left column is a single IFrame. Still, it's not clear how they managed to get rid of the handle bar. Now I'm curious too...
Is is possible that Apple paid facebook to remove the header you are talking about?
Maybe it's a special case and they have a special API/UI for people who are willing to give them cash money?
I wrote a Facebook application a while back and I do not believe it has what you are calling a box header on it: http://apps.facebook.com/photoisland/. The application is configured to run entirely in an IFrame and I am not using FBML at all.
I've finally found out how to get an IFrame without a header just like Apple does.
You have to sign a special deal with Facebook to get it... however this deal doesn't come cheap so it's out of question for most companies. :(