How to add a flash game to my facebook APP - facebook

I tried adding a flash game to my APP.
I looked on the (terrible) facebook developer website. All I found was this page:
http://www.google.be/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCcQFjAA&url=http%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Freference%2Ffbml%2Fswf%2F&ei=e-CXT4SAMMfpOamGqb8G&usg=AFQjCNGCKaCIDbWs0PrItofyEIlR4MSasg
But it says this will be legacy code and I should use a new method... I have no clue what that method is or where I can find it.
I tried these lines:
<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://mywebsite.com/game.swf" />
and
<fb:swf swfsrc='http://mywebsite.com/game.swf' imgsrc='http://www.myurl.com/myflash.jpg' width='400′ height='300′ />
both failed... I'm desperate here, please help!

Just create an iframe application. That means create a page for your flash game to run on its own and then just point the iframe app to that url

Do exacly as on http://ugamesfree.com
Create a canvas app on facebook.
But remember, you need to have a SSL certificate to use iframes and redirects.

Related

Facebook Register Plugin not showing up?

I am trying to implement Facebook Register Plugin on my website for landing pages.
I am following this guide:
https://developers.facebook.com/docs/plugins/registration/v2.0
I've written following code:
<div id="registration">
<iframe src="https://www.facebook.com/plugins/registration?client_id=660604224016242&redirect_uri=http://automaton.in/store_user_data.php?&fields=[{"name":"name"},{"name":"email"},{"name":"password"},{"name":"gender"},{"name":"birthday"}]">
</iframe>
</div>
But nothing is showing up instead of a box with border.
I've also created my facebook app with app-id 660604224016242.
Also, I am running my site locally without a local server! Do I need to run this on a server?
Please help me, I really need to implement this plugin!

How to modify facebook canvas page?

I am making a game with Unity3d for facebook.
Is it possible to add anything else but the unity3d binary on the facebook canvas? Like background image, external advertisement banner etc. ?
Earlier there were more options, but nowadays you can only set you .unity3d file in the settings.
There are very limited options in facebook developer pages for modifying your canvas page, so I guess the page modification has to be done somewhere else?
I also tried Unity´s own webPlayerTemplate but that does nothing.
Facebook canvas is just an iFrame meaning what ever you put in the web page of the game will be displayed in there.
You can add anything by editing the html page that comes as output from the webplayer build. Easy solution to try opening the html page in dreamweaver or similar and start adding elements and see if it comes in the output. Be cautious there are chances that the html content gets rendered behind the game.
PS: one problem with untiy's web player build it that it always gets rendered above the html contents in the page.
Thank you for your answer!
I forgot to mention this:
When making a game on facebook without "facebook SDK for Unity" you can set the canvas as a webpage.
Then the canvas can be modified with the html. I tried that and it works just fine.
But when your app is using facebook SDK you can only include .unity3d file URL and the html file is completely ignored.
PS: after some more studies it seems you can inject html commands with Application.ExternalEval()
basicly anywhere inside your unity project by:
string injection = "lines to be executed on your canvas page";
Application.ExternalEval(injection);

Error launching native application from web app - iOS - URL can't be shown

I'm running into a bit of trouble trying to call my native iOS application from my web app (apple-mobile-web-app-capable). Whenever I'm in Safari pressing the button to open my app with a custom url scheme, that works just fine.
However, when I've added it to the home screen I get stuck with the error: The URL can't be shown. Redirecting to http or https works fine but if I call mysupercustomurlscheme:// I get the error message above.
I've tried opening it by document.location.href, window.location, etc etc but nothing seems to do the trick and I've run out of ideas.
If anyone has got any ideas I'd be most grateful to hear them.
Thanks in advance!
Okay, here's a somewhat clumsy way to do it, but it works and might help some poor soul out there trying to achieve the same thing.
First, create a simple HTML link as, apparently, regular HTML links open in Mobile Safari instead of within the full screen view in the web app.
Link
In redirect.html you simply redirect the user with some simple javascript.
window.location = "mysupercustomurlscheme://"
And that's it! It's certainly not the best way to do it but it's 'fairly' seamless. That's what I came up with at least, if you have any other suggestions do let me know.
Hope this helps someone!
Just wanted to post an example of what Tobias is referencing. You need to host on your server and link to in emails, social media, etc. Simply substitute in your app's URI and your App Store link. Note that the iframe works on more browsers.
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
window.onload = function() {
// Deep link to your app goes here
document.getElementById("l").src = "my_app://";
setTimeout(function() {
// Link to the App Store should go here -- only fires if deep link fails
window.location = "https://itunes.apple.com/us/app/my.app/id123456789?ls=1&mt=8";
}, 500);
};
</script>
<iframe id="l" width="1" height="1" style="visibility:hidden"></iframe>
</body>
</html>
So, if the user has your app installed, the link with the URI will succeed and you will exist the browser before the script for redirecting to the App Store can be triggered. If the user does not have your app, the redirect succeeds (after a brief ugly error message). I am a developer at Branch and we use this, so feel free to reach out with questions in implementing.

Transitions between different HTML pages using JQTouch for iPhone

I am trying to create a simple iPhone application using HTML/JavaScript/CSS with the help of JQTouch and PhoneGap. For accessing different parts of a web page, the transitions work fine, however when I try to do the same for different web pages, they do not work.
I am doing this:
<li><a class="slide" href="http://www.flickr.com/photos/remysharp/3047035327/" title="Tall Glow"><img src="http://farm4.static.flickr.com/3011/3047035327_ca12fb2397_s.jpg" height="75" width="75" alt="Tall Glow" /></a></li>
Does anyone knwo whats wrong pleasE?
C.
jqtouch can only slide in divs, i.e. parts of a single web page. when you follow links it just loads whatever page you navigated to.
You should try loading your external link in an IFRAME. As long as the site you are linking to doesn't have a frame buster, you should be able to stay on your own site and display the content of the external page.

Facebook - serverfbml form action must be within the application's connect url

I am not sure, I am using a pretty standard piece of code for facebook. It sends requests for people regarding my application. All of a sudden I am receiving this error:
serverfbml form action must be within
the application's connect url
Have you been having problems with using either one of these:
fb:serverFbml
fb:request-form
fb:req-choice
fb:multi-friend-selector
thank you!
I don't know if you managed to find a solution yet, but I will tell you what my solution is. The action attribute of your forms should NOT be relative URLs, that is you should give the full URL of the website where the application is hosted:
fb:editor action="http://www.mydomain.com/myapp/index.php?params=1" labelwidth="100"
Use the canvas URL under Facebook Integration section in your application's edit mode.
If your canvas URL looks like this:
http://www.example.com/myfacebookapp/
then, in server fbml form action, the URL MUST be in the same directory of your canvas, like this:
(using the example of
<fb:request-form action="http://www.example.com/myfacebookapp/somepage.html"
Also, if the whole contains blank spaces i.e.
http://www.example.com/myfacebookapp new/
consider eliminate that blanks, or use %20 instead of the blank when you specify the URL canvas on Facebook and when you use that URL in form
<fb:request-form action="http://www.example.com/myfacebookapp%20new/somepage.html"
I solved it finally.
Dont get messed up with all type of setting.
Simply go to your facebook app
click edit app button
now copy Canvas URL
and paste it under
<fb:request-form action="CANVAS URL HERE"
method="POST">
Well, it worked for me.!
Thanks to "tsegaye"
i had the same issue.. i used the canvas url in the summary page and it worked. You can try it out aswell
This is not the solution. If you do this, when user clicks "skip" on the dialog, he would be send to http://www.mydomain.com/myapp/index.php?params=1" instead of your application.
The solution is:
action="http://apps.facebook.com/myapp/" -> this "/" at the end would help.
It could be also any other action inside your app for example:
action="http://apps.facebook.com/myapp/sendRequest"
This solution works if you use friend selectors outside the scope of sending requests. For eg. Selecting friends to collaborate with in your app.
Not an answer but this is what helped me. I have a iframe based application and i tried to use the facebook iframe based friend invite code. In my action, i put the app.facebook.com/myapp/ url which whould be give me this fbml error
serverfbml form action must be within the application's connect url
Also when i pressed "skip" it would take me to a 404 error. The solution was to use the canvas url under facebook integration, as suggested by #tsegaye