Facebook canvas url with or without www - facebook

I've made a website, which relies on Facebook OAuth in order for the user to participate in a competition.
The canvas URL within Facebook differentiates between https://www.mycompetition.com/ and https://mycompetition.com
Our server is set up to receive both entries, but if I enter the site using www, Facebook complains that the URL doesn't match when authorizing.
Do you know how to make Facebook accept both entries?

Solved, by the way. The webserver now contains two websites. The first contains the website, the second one just redirects to the first one, using JS. Easy :)

Related

Dynamically linking to a Facebook Company Page

Our database has an entry for our companies' Facebook and Twitter pages. With Twitter, it's possible to create dynamic links based solely on the company's Twitter handler. For instance, if the company provides us with the Twitter handle acme, we can dynamically create a link to their Twitter page with <a href='http://www.twitter.com/#{company.twitter_name}'></a>.
In some instances, the same is true of Facebook. Coca Cola for instance has http://www.facebook.com/cocacola. Many other companies have a url that looks more like http://www.facebook.com/pages/acme/123456789. In the latter case, the numerical id at the end is necessary to reach the page. The URL http://www.facebook.com/pages/acme would not work.
My question is, is there a way to dynamically link to a Facebook company page with just their handle? Or do you always need to provide a full URL? I'm hoping Facebook has some magic back door for developers that I simply haven't happened upon yet. Thanks for your feedback, one way or the other!
A link in the form http(s)://facebook.com/profile.php?id={nummeric_id_here} always works, for pages as well as for user profiles.
It automatically redirects to the “real” address – to the username that the user or page might have set, or to an address in the form you mentioned (for pages that do not have enough likes yet to set their own user name).

Facebook Site URL and Wall Sharing

Is wall sharing (performed through the FB JS API) in any form related to the Site URL setting for a given application? Users don't actually log in to our website using the tool - they just share the URLs on their walls via an application we've setup.
We are looking for expert confirmation on the subject as we'd like to change the Site URL in support of a new login provider wrapper (Janrain).
No, you can share urls even if the Site Url is not supplied. But the domain should be listed in the "App Domains" box. This shouldn't be a problem since it supports multiple domains. An example would be both myapps.mydomain.com and myapps.myotherdomain.com are listed there. I think this is ok in your case.

Permalink-able pages for Javascript web apps

I'm building an app using Backbone.js and a private API that serves assets and JSON.
Most content in the app is accessed through the root '/' and the Backbone router serves up views based on the hash (ie /#about or /#view).
The problem is that when a page is shared to Facebook, it scrapes the main page and seems to disregard anything past the hash mark.
Are there any good rules of thumb for url paths or content that is not highly dynamic to make the app more presentable to Facebook, Google, etc?
Google has some good info on making AJAX apps crawlable.
https://developers.google.com/webmasters/ajax-crawling/
You could create a dummy page on your site with a full URL that is only accessible to the bots that Facebook and Google use. I'm not sure what Google's user agent is, but Facebook's is listed here:
https://developers.facebook.com/docs/reference/plugins/like/#scraperinfo
So you could have a blank page on /item/itemid1/ that is only accessible to the bots, point your og:url tags to that blank page and have the correct metadata on it for the Facebook scraper. Whenever a regular user tries to access it, redirect them back to the correct hash-based URL.

Secure Canvas Clarification

Been reading the docs about canvas and secure canvas, mainly due to the requirement that we provide a secure url before october 1. However, I cannot determine with any sense of certainty that we actually need to use a secure canvas.
If we only want to provide the ability for users to "login" and "like", do we even need a canvas? As far as I can tell, a canvas is something that facebook creates an iframe for, which points to a canvas url we provide, which is ultimately displayed on the facebook site.
Any clarification would be appreciated.
Apps accessed via facebook.com (i.e apps.facebook.com/something or via a Page Tab) will need to be accessible over HTTPS - you won't need to make your site to be available over HTTPS for the social plugins or off-Facebook API usage to work
The blog post with the details is https://developers.facebook.com/blog/post/499/
Specifically: All Apps on Facebook (Canvas and Page Tabs) must support HTTPS by October 1.

How do I redirect to another website without the referrer displaying my website?

I would rather it just display nothing, or another website. I don't want it to display any website that I am affiliated with.
Use a URL shortener, such as bit.ly to make the link. That way you're once removed, there may still be trace but it won't be as obvious in the referrer.
Use short url in your web link. such as tinyurl
user see the tiny url instead of the real url. They couldn't see the website that you are affiliated with
If you redirect from an HTTPS page to a URL with a different domain then no referrer will be sent by the browser to avoid leaking information. This will save you from relying on any third parties.