I have a app ( web, ios and android ).I want to the create a Facebook canvas app where it will only show the first page of our web app.To achieve this.I created a Facebook canvas app in Facebook developer console.I filled the details which was required (Secure Canvas URL : https://example.com ,Mobile Site URL : https://example.com ) I am not sure what is secure canvas url meant so I put the link of my web app.But when open the canvas page
( https://apps.facebook.com/some_id).It is giving 405 Not allowed error.After digging I found out that Facebook is making a post request to my web app with a signed request ( not sure what it is ). How do I show my web page on facebook canvas page.Please explained to me how this things works and how can I achieve it.Thanks in advance.
Facebook loads app into the iframe by making a POST request to your app URL. You typically get a 405 Not allowed when your URL does not accept POST requests.
Many webspace providers have a setup where POST requests to “static” resources (such as .htm/.html files) are not allowed.
So you need to either change that in the webserver configuration (might be possible via .htaccess on an Apache; ask your server admin/support if you’re not sure), or you need to use a different “file type” for your app’s base URL that you want to load into canvas - for example, if PHP is available, the configuration usually allows POST requests to PHP scripts by default.
Related
I am trying to create a functionality and load on Facebook, the page will be load as "apps.facebook.com/appname". Can we use "Facebook Web Games" to load our application on Facebook.
In earlier days i have placed the webpage URL in the Facebook Canvas URL. But this feature doesn't exist on Facebook.
Anyone help me with this?
Can we use "Facebook Web Games" to load our application on Facebook.
Facebook Web Games is what used to be called the Canvas platform.
Facebook just renamed it, after they decided to use the “Canvas” name for their new advertising format.
So yes, you just put the URL of the page you want to display under apps.facebook.com/appname in the Facebook Web Games settings.
(This is not limited to games, despite the naming. If you want to show other content that way, that is fine as well.)
Hi I've created an app for Windows Phone 8 using the ContosoSocial Facebook login interface.
It uses the following call to do this:
FacebookSessionClient fb = new FacebookSessionClient(AppId);
fb.LoginWithApp("basic_info,publish_actions,read_stream", "custom_state_string");
This works fine when I use the default AppId but when I change it to the one given by Facebook following app registeration I get the following error:
Given URL is not premitted by the application cofiguration.: One or more of the given URL's is not allowed by the App's settings. It must match the website URL or Canvas URL, or the app domain must be a subdomain of one of the Apps domains..?
I've searched and this problem has come up on several occations and as far as I can work out it's to do with my app settings on Facebook.? Facebook asks for an App Domain which I've left blank as I'm not sure what this is or used for..? Do I need one..?
I've followed several tutorials Scrumptious but then all show a different app registration process on the screens than I'm faced with. A little research revealed that Facebook has recently changed the process which is making it even more confusing for me. I would appreciate some help here.
I want to create an app which will pull in a news feed direct into a panoramic item on the app's main screen.
Many thanks
EDIT: I've tried adding my web site URL to the app domain by I get the following error: This must be derived from Canvas URL, Secure Canvas URL, Unity Binary URL, Site URL, Mobile Site URL, Page Tab URL or Secure Page Tab URL. Check and correct the following domains: ***************
Below is the screen shot for configuring app:
Store ID, Application Name & Windows Store Beta ID removed, I'm now getting the following error:
App Not Setup: The developers of this app have not setup the app properly for Facebook Login. ?
Go to Advanced Settings in your developers.facebook.com/apps/ of your app and check that "Embedded browser OAuth Login" is enabled and set to Yes.
I'm trying to learn how to create a facebook canvas app using ruby/rails and develop it locally.
I create a new demo app and launch the server on my local machine at localhost:3000 then I create a new facebook app and point the Canvas URL to localhost:3000. Note that I check the sandbox enabled option and do not provide a secure Canvas URL.
As I try to access the app's Canvas page on facebook I see the following error displayed:
Routing Error
No route matches [POST] "/"
Try running rake routes for more information on available routes.
Note that when I access the app locally at localhost:3000 I do not get the error. I just simply see the usual default "Welcome Aboard" page from a newly created rails app.
Can anyone please pinpoint me to a solution or set of proper instructions on how to set up a local environment for fb canvas development? Any help would be much appreciated.
Your server or app isn't configured correctly to process the HTTP POST request from Facebook - I'm not familiar with how rails is configured but this blog post seems to offer a workaround: http://blog.coderubik.com/2011/03/restful-facebook-canvas-app-with-rails-and-post-for-canvas/
Note that the initial request to load your app will always be a POST request - this contains a signed_request value with data your app uses to know who the current users is - https://developers.facebook.com/docs/howtos/login/signed-request/ has more details
we have created a Facebook app, but when opening this on a mobile (via Web or iPhone) the page results in a 4oh4 error. I have setup a Mobile Web URL but still (after 1 hour wait) gives a 404.
Do I need to make specific changes on my app?
Please help.
This is expected as #Igy stated. You will need to have a handler to support redirecting mobile users to your apps.facebook.com/ or you can redirect them out of Facebook to your own URL if you are going to try and link to your page directly with an app embedded as a tab.
i.e. point link to http://yoursite.com/redirector
is mobile goes to http://yoursite.com/myapp or http://apps.facebook.com/
non mobile goes to http://facebook.com//app_
Some things to note:
You won't get any page specific data back from facebook on your page (i.e. Liked or Not Liked).
Based on #1 you won't be able to restrict the non-liking app users from a page.
After trying everything under the sun to get Facebook to redirect to a mobile web URL, here is what I needed to do in order to get the redirection working:
Make sure the Facebook application is a canvas application. This gives you the ability to give the application a namespace.
Give your application a namespace so that you can access it through https://apps.facebook.com/NAMESPACE. From here, Facebook will do the detection for you, and if needed, redirect your users to your specified mobile URL.
Make sure your app is NOT in sandbox mode.
If your app is in Sandbox Mode, Facebook won't redirect you to the mobile version you have specified in your app settings.
Facebook does the redirecting for you, you don't have to. Although their version of what "mobile" is and what you deem "mobile" might be different.
I'm a bit confused about the difference between a facebook canvas application and a facebook mobile web application. Here is the context of my confusion..
I have a canvas application, let us call its namespace as myfbapp, and I basically can access it from https://apps.facebook.com/myfbapp and after I login to FB it opens up with in Facebook. I'm using java (apache / tomcat) for my server side implementation and for simplicity sake let us say I just have an index.html and a authenticationfilter.java (which implements Filter) in my web application. I don't have any Facebook specific Javascript API (no FB.init() javascript or anything like that ) or code in my index.html. Whenever user accesses my canvas application I first get a request to my web application where I get the signed_request , oauth_token , FB user ID etc which I can use for my internal authentication, session creation etc. I have absolutely no issues with this canvas application and every thing works fine. Please note that when user accesses this app the request I get from the browser to my app server has the signed_request , user_id etc.
Now I wanted to make this app available on mobile devices as well and I thought, oh well all I need to do is add the mobile URL for this app in the mobile web app section in Facebook for the same myfbapp. I did that and as expected when I login to facebook from my android phone myfbapp is listed under the apps section, so far so good. The problem starts when I click on the app. I get the request on my app server but it doesn't contain the signed_request , user_id etc.. ????? I was expecting the mobile app to work the same way as the canvas app but apparently it doesn't or I'm doing some thing wrong.
Then I started reading more about facebook mobile app at http://developers.facebook.com/docs/guides/mobile/web/#register where it talks about adding various Facebook Javascript API's in the index.html (I never did anything like that in my canvas app) and then I started thinking , may be then mobile web app is more (or exactly) like a regular web app with FB connect and not like canvas application (meaning it doesn't really load with in Facebook) , is this true?
On mobile facebook you can not see any custom pages/tabs. They are apparently wokring on that at the moment.
So it will be different to a canvas app. Your mobile app will be a completely seperate site and page not in an iFrame on Facebook.
Some behaviour i discovered recently with Facebook Canvas / Page Tabs on mobile devices.
Maybe this helps to understand a little bit better how facebook behaves in mobile context.
Mobile Browser
Access App URL
Example URL http://apps.facebook.com/myapp/
Redirects to the configured mobile website under Settings > Website > Mobile Site URL and adds additional params /?ref=web_canvas&code=<signed_request_code_field>
About the signed_request code field
An OAuth Code which can be exchanged for a valid user access token via a subsequent server-side request
Access App Center
There is no way to access the Facebook App Center via the mobile browser.
Access Page Tab
Example URL http://facebook.com/a_facebook_page/custom_page_tab_url
Custom Page Tabs are not visible via the mobile browser.
Facebook Open Graph Search
Searching for myapp returns the link to the Facebook Canvas.
Same behaviour like Access App URL via Mobile Browser
Mobile Facebook Client
Access App URL
There is no way to access this url directly.
Access App Center
There is no way to access the Facebook App Center.
Access Page Tab
Example URL http://facebook.com/a_facebook_page/custom_page_tab_url
Custom Page Tabs are not visible via the mobile facebook client.
Facebook Open Graph Search
It says that this app is not compatible with this devices.
You need to register an iOS / Android App and send the user to this app to get rid of this error. Probably it helps the user if you add the link to the standalone application to the Facebook description of the app. Which should then be visible there.