So I have a banner on a android application and I want to track how many people came to my site clicked that banner ?
What is the best way?
Tracking the source of your traffic from an app is no different from a webpage.
Onclick of your banner you might trigger a web URL like site.com/page.html.
You can add parameter to the URL by adding the source site.com/page.html?source=app
And then on your server side you can check for the query parameter to find from where this request was coming from.
you have Several choices
you can send a parametr with your website's url , for example :
http://www.yourdomain.com?sendFrom=app
you can use analytics libraries (such as fabric,facebook analytics, firebase ,...) and register events with these services when user clicks on your banner.
The app isn't mine, only the add-banner, so I can't do anything app side.
What about this: https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#google-play-url-builder
I'm new to Android development. I'm working on an app for use at work - I'm an EMT. I was hoping to use the state's registry as a means of authenticating the user as an active provider. https://ems.health.state.pa.us/emsreg/activepractitioners.aspx
I know nothing of asp, except that I should be able to pass some input through the URL with ?name=value. But when I inspect the element of the last name field...
input name="_ctl0:_ctl0:SessionLinkBar:Content:tbxLName" type="text"
id="_ctl0__ctl0_SessionLinkBar_Content_tbxLName"
I can't use this. Honestly not even sure what I'm looking at here. Is ":" a container?
Ultimately I'd like to take the user input on 2 edit texts (last name & certification #), click a button to POST them to the activepractitioners.aspx, and either get the whole response and pare down for what I need (Status Active, which I've yet to find labeled on the site) or verify the response then query its label.
I've tried a few of the methods here and I keep crashing the emulator. Also I'd rather not see all the strikethroughs in Android Studio from deprecated methods. I welcome all help, but please remember I'm a n00b - take it slow for me. Thanks!
UPDATE:
I've gotten some results using JSoup. I get to a landing page that should contain just one result (the certification # is unique) and a link. The format of the link is as follows:
<a id="_ctl0__ctl0_SessionLinkBar_Content_dgSearchResults__ctl2_lnk" href="javascript:__doPostBack('_ctl0$_ctl0$SessionLinkBar$Content$dgSearchResults$_ctl2$lnk','')">
It uses javascript to invoke "doPostBack." Any idea on how to automate this too? As it is I can parse the response to a document and scrape the table for the word "active." But I'd like a bit of fool-proofing. Thanks in advance!
Since you are new to Android dev, I suggest you to spend some time having a look to Google Android Volley APIs.
It allows you to easily set up GET and POST requests (and works great).
I've been redirecting my users for the past year from my domain:
http://example.com/get
to: market://details?id=com.example.myapp
Today I've check this on Nexus 5/LG G3/OnePlus One from the chrome browser app and it stopped working!
Now, when my users try to download the app they are redirected to a broken link.
Anyone know anything about this change in the Chrome app in Android?
from reading the chrome's version 40 release, there are some insight i d like to share
http://blog.chromium.org/2014/12/chrome-40-beta-powerful-offline-and.html
they updated to Content Security Policy Level 2, which has a stronger control over redirects.
https://w3c.github.io/webappsec/specs/content-security-policy/#changes-from-level-1
The path component of a source expression is now ignored if the resource being loaded is the result of a redirect, as described in §4.2.2.3 Paths and Redirects.
Redirects are blocked by default, and explicitly allowed with a new unsafe-redirect expression.
So I did some testing. if your initial action started from redirect (no matter window.location or http 302) it will show an error. but once i created a hyperlink to market:// and explicitly clicked it, it worked fine.
for now i ended up creating a webpage in between, where i ask the user to click the link to proceed.
I was testing this url on different devices with different OS/Play Store/ Play Services/ Browsers. looks like it's related to browser but not OS or Play Services.
Initially I updated Play Services and Google Play Store and my old Chrome (v18) was opening market://details?id= url fine.
Afterward I had updated my Chrome (v18) to version 40. And it's not working any more.
Meanwhile, FireFox and default "Browsers" still opens this url and redirects to Google Play Store app.
P.S. I have registered issue in Chromium bug tracker. Let's see if there will be any response:
https://code.google.com/p/chromium/issues/detail?can=2&q=market&colspec=ID%20Pri%20M%20Week%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified&id=454396&thanks=454396&ts=1422888121
UPDATE [6.05.15] : Unfortunately, they decided not to fix this issue, saying, that it's planned behaviour. As they said, user should click the link by himself. Only then re-direct to the app on devices is allowed.
So, there is only one "work-around", that I see for now: create a page, that contains text like "Click link below to go to the app", followed by link like:
Load Example App
or
<a href="intent://foo.bar#Intent;scheme=blabla;package=com.example.myapp;end" > Load App/ Activate your Profile </a>
Try the link below, replacing your.app.id with your own identifier:
https://play.app.goo.gl/?link=https://play.google.com/store/apps/details?id=your.app.id&ddl=1&pcampaignid=web_ddl_1
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.
I have researched the most popular questions on SO already (Question 1, Question 2, Question 3, Question 4, and Question 5)... None of them help with my situation.
I have the application settings laid out like this...
App Domains: azeverything.com
Sandbox Mode: Disabled
Website with Facebook Login
Site URL: http://azeverything.com
****App Domains*** requires that no protocol be identified and Site URL requires that a protocol be identified.*
I have tried using www.azeverything.com and that didn't work either. Everything seems to match up. By the way, this is a WP site. I'm not developing locally either. It's all live.
Try to check at Settings > Advanced. At Valid OAuth redirect URIs, make sure you have a correct domain.
Hope it works.
You need to add the URL to your app:
Go to the app, you want for user login, on the Facebook Developers page
Click on the settings tab
Click add platform
Select Website
After selection it will ask for some details such as URL for your website which uses login with facebook feature, fill the form and submit it
That's all and you are done. Make sure that the app's URL is the same from where you're logging in.
Under Basic settings:
Add the platform - Mine was web.
Supply the site URL - mind the http or https.
You can also supply the mobile site URL if you have any - remember to mind the http or https here as well.
Save the changes.
Then hit the advanced tab and scroll down to locate Valid OAuth redirect URIs its right below Client Token.
Supply the redirection URL - The URL to redirect to after the login.
Save the changes.
Then get back to your website or web page and refresh.
This is a basic breakdown for slow people like me, and I didn't see this mentioned before.
The "redirect uri" isn't the place where you're redirecting to, but where it's coming from.
Say you have your app at http://myFBapp.com listening to /auth/facebook, and after they log in, redirecting them to /UserLoginHooray. The "Valid OAuth redirect URIs" should read http://myFBapp.com/auth/facebook, not http://myFBapp/UserLoginHooray.
Explanation:
HTTP Requests that have been redirected (302) include the original address in the header, so Facebook is merely putting a very basic layer of security on the request.
I chased my tail on this issue for hours. My coder and I could login with FB without a problem but my wife couldn't. She would get this topic's subject message. I tried every setting and URL that I could think of for my Lavarel app.
My issue was that my wife was signing in from:
http://www and we were using http://
A short trip to CPanel and a redirect fixed that. Hope this helps someone!
For Lavarel these FB app settings worked for me:
Settings/Basic - App Domain: mydomain.com , Site URL: http://mydomain.com/login.
Settings/Advanced - Client OAuth Login: Yes.
Settings/Advanced - OAuth redirect URIs: http://mydomain.com , http://mydomain.com/login.
App Details/App Center listed platforms = No. I'm only using the login for now.
I have a website with facebook login.
It has been stable and working for months.
No code change has happened for weeks.
Then, suddenly, the facebook login gives an error message:
Error
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.
After debugging "for awhile", I reset my facebook app secret and it started to work again!
Michael Blackburn's answer helped me resolve my issue, but I want to give more detail on my fix.
I have a php app that posts to a user's FB page.
I own two domains:
http://app.my-web-app.com
http://app.mywebapp.com (no hyphen)
I built my site off the first domain because it read better IMHO (at least it did at the time).
Some users typoed the url so I bought the second one with no dashes for that reason.
So, one of my users was having the "Given URL" error.
Turns out he was going to http://app.mywebapp.com and the rest of them were going to http://app.my-web-app.com
I fixed everyone by adding all possible redirect URIs:
Granted, there are 100 better ways to implement this, but here is the workaround for now.
1.Make Sure Website Url and platform added, if not then visit https://developers.facebook.com/quickstarts/ then Select
Platform -> Setup SDK -> Website Url And so on..
Note: website url can't be like this : https://www.example.com just remove www and make it simple and working ;)
2.Goto App Dashboard -> Setting -> Click on Advanced Tab then go to bottom of the page and enable Embedded Browser OAuth Login
and leave Valid OAuth redirect URIs blank and Save it
I found Valid OAuth Redirect URIs under PRODUCTS then Facebook Login > Settings not as everyone is stating above. I am supposing this is a version issue.
It still didn't work for me. I guess I really have to add Android Platform rather than just the Website. This is annoying because my app is still in development mode :(
UPDATE: I'm using Expo to develop my react-native app and used info provided here: https://developers.facebook.com/apps/131491964294190/settings/basic/ to set up the Android and iOS platforms. This resolved the issue for me.
Sometimes this error occurs for old javascript sdk. If you save locally javascript file. Update it. I prefer to load it form the facebook server all the time.
Go to facebook developer dashboard
Select settings -> select WEB(for website) -> Add platform
Add your site URL.
This should resolve your issue.
So... facebook distinguishes pretty harshly between http and https in your app. This is just another small thing to check if you run into trouble.
I solved this issue by specifying correct site URL in my App Settings.
It works fine now. You have to specify your website Url such as http://www.xyz.com/
Under advanced tab make sure "Valid OAuth redirect URIs" contains valid URI or leave it empty(not recommended)
"http://example.com/"
instead of
"http://www.example.com"
sometimes you need to check your code (the part of redirect)
$helper = new FacebookRedirectLoginHelper('https://apps.facebook.com/xxx');
$auth_url = $helper->getLoginUrl(array('email', 'publish_actions'));
echo "<script>window.top.location.href='".$auth_url."'</script>";
if any changes happens there (for example, the name of your application "https://apps.facebook.com/xxx" in relation the application settings in facebook, you will get the above error
For Android Developers,
Make sure you have enabled Facebook Login inside the Products list inside Dashboard of your Facebook project app and have added all the required details as you go through the whole flow.
The login should work without giving the same error.
I have a an app that uses a webview and webviewclient. It's supposed to be a whitelist based browser for kids, so I'm checking urls and only allowing certain ones to be loaded. Generally its working, but when I search on google and click a search result, I get a page that says "Redirect Notice - the previous page is sending you to..."
I am not posting code because I don't know which section is relevant. Can anyone point me where to look?
Added: The problem has to be either
1) in the way Google is serving the search results (why would it it be different than the default browser?), or
2) how the webview is handling them.
I'm starting to think it has to do with the way Google is serving search results, as the links give the "redirect notice" anywhere. Here's an example link:
http://www.google.com/url?sa=t&source=web&cd=2&ved=0cccqfjab&url=http%3a%2f%2faerik.com%2f&ei=dlwwt-bgc-wciqk8tkzadw&usg=afqjcnhkstsuy-erndsrb4nkkpvda_xutq
If Google is serving my app search results differently, could it be because of cookies or user-agents? Does a webview automatically handle cookies and send the default user-agent?
Ah... I figured it out. I doubt anyone else will have a similar issue, because the root cause was that I was lowercasing the URL as I checked it against the whitelist, then loading the lowercased URL... kind of dumb, but then again, many bugs are.
Sign in with your google account, then visit the url. It will work. Once you successfully visited the url, you can revisit that site .