I've created a HTML5 game that I run in my browser. I want to add facebook login, and copypasted stuff from the tutorial and replaced with my appId.
When I run it it states:
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
The problem here is that I dont have a domain to run it under? My game is just running locally in chrome for now, but down the road I want to wrap it for mobile devices (android, ios, wp) using Phonegap or something
Are you running it inside your localhost?
Check this post for more information, it might help you:
Local Facebook App Development using localhost
Related
I am learning active directory and want to setup a local intranet. I have a web app which requires authentication using windows login credentials. Is it possible to do the login function via javascript/jQuery? If so, how can I get the windows credentials.
I would appreciate any ideas..
Thanks
Integrated Windows authentication works out of the box in Windows environment and can be setup at the web server (IIS) and typically does not require any additional coding. There are tons of resources out there about this topic.
Typically, you need to change Authentication of your web site in IIS from Anonymous to Windows and it should work. In some situations you might also need to adjust a browser settings - for example, if browser will prompt you for a login - it can be changed by configuring Integrated Windows authentication in IE - Internet Options - Advanced Tab.
I have an android app that can be accessed through a web browser too. I need to put a banner to let the user install the android application. How can i tell (if the user enters to the application through the web browser) using javascript or jquery, if the android app is already installed on his mobile phone?
All i want to do is: If the user clics the banner and the app is already installed, open the android app. Otherwise, redirect the user to the playstore to let him install the app.
Let's say your app is uploaded on both Apple AppStore and Google Play stores.
You need to:
Sniff in your webpage which OS is installed from the device accessing your page
good link to find how => here
Enable deep linking to listen for exactly same link from your mobile native app
for Android you need to register your main activity or any other activity to listen for these links
for iOS - no idea honestly, look around or find a 3rd party service
code for Google Play with deep link. And the deep link is same as your website page you want to cache/index in Google Search (or any other search engine)
sample link to index/use => http://my_website.com/results
// below snipplet need to be for Android devices only
// i.e. need to sniff and have if/else validation for Android, iOS, desktop and so on
// will call with 25 mills delay in case deep link fails, i.e. no installed app
setTimeout(function () { window.location = "https://play.google.com/details?id=com.foo.myapp"; }, 25);
// try to load the deep link URL
window.location = "http://my_website.com/results";
repeat above for iOS and desktop/Windows Mobile
Additional advantage of above is the full app indexing without the lame App Indexing excuse from Google (min sdk no more than 17, Chrome for Android availability and so forth limitations).
There is no way to detect if an app is installed using Javascript.
However you can get the behavior you describe and you don't even need any javascript:
Choose an URL for your app on a web server you own and make the banner link to it.
Set this web URL as a deep link handled by your app by specifing it in your app's manifest. It should open the main Activity.
On your web server, configure this URL to redirect to the Play Store URL of your app. Optional: if your app is also on iOS, you could detect the iOS browser and display something else.
If the app is installed it will handle the URL and open, otherwise the browser will follow the link and the redirect and the Play Store app will open to handle the Play Store URL to your app.
I am using Parse for JavaScript, and is working with the ionic framework within the Intel XDK.
I am trying to incorporate social media login, where users are able to signin using facebook.
I generally know how to navigate this but my main concern is the following:
I am using facebook for javascript where it requires a URL, and when that URL is not accessible it doesn't work. Hence, on an iphone or android I cant use facebook yet.
The specific error I get is the following:
Warning
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
What have I done as far?
I went over the following guide thoroughly:
http://www.benjamin.my/how-to-set-up-facebook-connect-plugin-and-parse-com-in-ionic-phonegap/
It does mention near the end of the guide that
You may have to add an iOS setting or Android setting too eventually when you deploy to either platform.
and this is the part where I am having issues, and for a while.
I have also looked into:
http://shatter-box.com/knowledgebase/facebook-functions-for-cordova-crosswalk-phongegap/
but I am confused in how I can grab the android hashtag. I am not using eclipse, but working within the xdk.
Crosswalk is an excellent wrapper to allow HTML5 games to be packaged as native Android apps. You upload your HTML, JS and CSS files and it wraps it with Chromium for Android and builds an APK. It has full GPU support including WebGL, making it far better than PhoneGap.
I want to use the Google Play Game Services web API in a Crosswalk app, but it appears Crosswalk runs from the origin file:///android_asset. E.g. the main page will run from file:///android_asset/www/index.html.
It does not appear possible to allow Crosswalk apps to use the web API. The API console rejects file:///android_asset as an "invalid URI". Is there any workaround to this? Crosswalk is the only sensible way to publish HTML5 games as native apps on Android, and it's a shame if we can't use Google Play services!
The JavaScript code is limited by the same-origin policy, so you cannot access the Google play services(https://www.googleapis.com/*) from the origin file:///android_asset.
But Crosswalk has provided the solution for the cross-origin xhr, you can easily achieve that via adding the following configure to the manifest of your app.
{
...
"xwalk_hosts": [
"http://www.host-you-want-to-go.com/*"
],
...
}
More details in wiki.
You must try it in the latest beta version of Crosswalk, 6.35.131.5.
You can also ask the help about Crosswalk on the crosswalk-help#lists.crosswalk-project.org, in which you could get more faster response.
I wrote a simple example that accesses google play game services with cordova and crosswalk. See https://github.com/rscohn2/phonegapi
With cordova, you can create a browser window for the login, and give http://localhost as the redirect URI. After a successful login, it redirects to http://localhost,
which is not present. The app detects that the browser window has redirected. It reads the access code, then closes the window before the user can see the error.
I've had a search around here and either
The answer isn't here; or
The search engine on here sucks
but,
I am trying to add FB integration to my Windows 8 Metro (yeah I said it) JavaScript app. the only problem is I cant work out what type of app I need to create on Facebook. There are only 3 options, iOs, android, and Web App. If I choose Web App, it asks for a mobile web URL, and of course the app isn't on the web so I assume this will be a problem. Further to this is he fact that the code I need to include in my "mobile app" asks me to define a channelUrl (again, no URL, as its a metro app) so I am very confused.
Anyone here gotten this successfully working and provide me a hint as to which type of FB app I need to create so that I can get the ball rolling?
Choose the first option Website with Facebook Login. In Site Url, you should be able to put down whatever you want, eg your own site, blog, etc.
You will use Web authentication broker. See
http://code.msdn.microsoft.com/windowsapps/Web-Authentication-d0485122