Can I determine if app was installed via Facebook Ad? - facebook-ios-sdk

Is there a way to determine if the currently running app was installed via Facebook ad?
I am currently calling [FBAppEvent activateApp] in my app delegate's applicationDidBecomeActive selector. I'm not using any other Facebook SDK features.
I would like to distinguish users that arrived via a Facebook ad. Is there any way on the phone to determine that an app installation came from a Facebook ad?

Here is the response I got from Facebook developer support on this issue.
Unfortunately this is not currently possible using the SDK. As per the docs, we only send information on when someone installs the app.
https://developers.facebook.com/docs/ads-for-apps/mobile-app-ads
"After installing the SDK, include the following code to be executed when your app is in the foreground. This will allow the app to ping back the install event to Facebook when the user opens up the app for the first time, and again in the future if there is a network error. Our client code will stop sending installs once it acquires a success code from the server, and our back-end will only count the install a single time if it receives multiple hits for the same device"
I hope this helps.
Thanks

Yes, there is. It isn't as easy as you would hope, but this is what you do.
Look in your logs on your server to see when someone's clicked through an ad
Find the IP address connected to that request I.E 8.8.8.8 (Google OpenDNS, if you're wondering).
look for the same IP address of someone who accesses the page after they've installed the app. If you find a match, your ad worked.
write a python script or have me write a python script to do this automatically.

Related

Unable to add API access entry

I have created three B2C applications:
TestWebApp
TestApiOne
TestApiTwo
Both API applications were created the exact same way. Web API access is enabled, reply URLs have been specified, an App ID URL has been assigned, and keys have been generated. Both APIs have an additional read and write scope.
In TestWebApp API access, I am able to add TestApiOne with all three scopes without an issue.
When trying to add TestApiTwo to the TestWebApp API access list, the operation fails with the following error.
Failed to add the API access. Reason: The B2C service has an internal
error. If you created this B2C directory just now, please try again
after couple of minutes. If the problem persists, please contact
Support
(https://azure.microsoft.com/en-us/documentation/articles/active-directory-b2c-support/).
If you do not have a B2C directory you can refer
https://azure.microsoft.com/en-us/documentation/articles/active-directory-b2c-get-started/
I thought maybe there is a limit of one API per application. To test, I created a temporary application "TempApp". I received the same error displayed above while trying to add API access for both TestApiOne and TestApiTwo.
Has anyone else experienced this issue?
There's not a limit of one API per application. I have done research and it works fine by my side.
Please have a look at the guide and check your steps.
I have tried to replicate the issues that you are facing by putting diff redirect reply url domains and also by making one application to be native and one normal web app but it doesn't help.
Could you try to delete all the webapps and try making 1 and then adding another to it.
Then create the 3rd one.
Please check this or if you can share some screen shots. That would be helpful.
You can definitely add multiple web apps to api access of one web app.

Is it possible to set up an own push service within an intranet?

I would have asked this in a follow-up comment to this comment but my reputation is still too low.
So here are the questions: Is it possible to change the endpoint URL of a browser or to add an endpoint URL so that my application can send its POST request not to a web service owned by the browser manufacturer but to a web service that runs inside my intranet? As my application is run in an intranet without connection to the internet a customized browser wouldn't be a perfect solution but it would be possible.
And now for the 2nd part: If it is possible - are there ready-to-use push service libraries for PHP? So far all I've found are libraries that let an application send notifications like https://github.com/web-push-libs/web-push-php.
Is it possible to change the endpoint URL of a browser
No, currently it is not possible to change the browser push service.
And in any case you would also have to run an instance of the browser push service on your own servers (e.g. https://github.com/mozilla-services/autopush).
I think in this case you can just use any transport like web sockets, for instance and a notification API to show it to the user. Not sure if persistent connections will work within service worker context, but this should not be a problem if you're still customizing a browser.

Create a frontend website for Horizon OpenStack

I have setup a private cloud which has 2 computes and the back end is working successfully. OpenStack and Horizon is used to create and manage instances.
Basically, Horizon would be used on an administrator level and not by the user. So for the user to enter inputs like RAM, Disk Storage, Image etc, i want to create a frontend (ReactJS, NodeJS) website though which they can provide the details for VM creation.
The flow would be:
User provides all details through an HTML form.
Those details go to the Administrator sitting who will check the details and then approve the request.
Once the request is approved, VM is created and user can manage the VM.
I want to achieve somewhat like the above.
The goal is to not allow access for the user to create, manage VM instances through horizon.
Any help ?
EDITS
The flow should be the following :
Login to the front end user dashboard.
Allow user to create a flavor by accepting the values.
Store the values into MySQL DB.
Admin would get the request inn his login. An 'Accept' and 'Decline' button would be there on each flavor entry. If admin accepts, using shelljs the openstack flavor creation command is run and the output is saved in db.
The user could get the accepted flavor on his side.
The user would create a VM instance by selecting the flavor which he recieved above.
Using openstack create server command, the VM would be created and a token url would be generated which will be displayed to the user.
8.When user clicks on the url, VM is launched.
So the above is the goal to be achieved using React, NodeJS and MySQL.
The difficult parts would be:-
Running the openstack cli commands using shelljs
Generating a token url.
I hope there might be a way to do this.
Thanks
Not sure how to help you on this. Some ideas:
You will need a python backend unless you want your backend to talk to the OpenStack REST API directly. Similarly to Horizon, using the Django Python web framework will save you some time with using the python client APIs
Then you can build a frontend app with ReactJS and BackboneJS. Since ReactJS itself will not let you communicate with the HTTP Response generated by your backend. Also, you should look into Redux to deal with the data flow.
Here is an open source project which does what you want mostly: https://github.com/cyverse/atmosphere/
HTH

Windows Store 8.1 App Azure ADAL offline client authetication

I'm building a Windows 8.1 store app and need to incorporate authentication. This is an enterprise app used in house. We load the app onto a tablet and a team may check that tablet out for weeks at a time, go out to the field to collect data and then we put in on a shelf until another team needs to use it. Now different teams may work for difference clients so when we authenticate users not only do they get access to the app but we also check what groups they are in to determine what clients they can work on or what previous records they can search for.
I've followed various ADAL tutorials and am able to setup everything in Azure and in my app I am able to authenticate a user successfully and get their groups. This relies on ADAL handling the username/password. What happens when the app shuts down and the user in a place where there is no internet (or even a reliable cell connection)? Specifically how can I have the user type a username/password to re-authenticate and get the same groups they were in when they can't access Azure services?
It appears they isn't available as the guidance always points to that is a risky proposition to have the app handle username/passwords. I understand that stance and can appreciate the caution behind it. However, in all of the ADAL documentation that I find that says this, none of them tell me how to handle an offline authentication scenario.
I have found links such as ADAL v3: How to authenticate using UserPasswordCredential? that tell me how to bypass the ADAL login page. I may have to move to that route and handle all of the username/passwords securely within the app, but first I would like to reach out and see how others tackle this scenario. Is it really as simple as avoiding best practices and just handle the username/password within the app?
If anyone has some guidance, ADAL (or other oauth providers) documentation, or other articles/advice I can follow up on to help achieve offline authentication I would greatly appreciate it!
Additional Information:
My scenario that I'm trying to cover is what happens when I have 1 device, 1 app, and many different users? These users will be in different groups that will determine how data fields get populated (filter data in combo boxes) and what previously submitted forms they can query for. All users would need to login when online to cache their information (say on Day 0) before they can ever use the app. On Day 1 user 1 uses the app and doesn't log out. I would expect the app to have a timeout timer to log that user out after 2 hours of no activity. On Day 2, user 2 just grabs the device off the shelf and takes it out into the field. He has no internet and needs to log in to determine who they are and what group they are in. I would expect since he has logged in once and verified his credentials already that we can enable this sort of scenario.
What I'm looking for is guidance if ADAL as a library can handle this or is it truly up to me the app developer to handle this sort of scenario. As I see it currently I need to store all user credentials, but at the same time it seems like everyone advises against that. I feel like I'm in a situation where I need to create a custom login screen and store the user data, SECURELY of course, even though its not recommended. It seems like all articles on how to use ADAL are written from a consumer app standpoint (or a BYOD) and don't take into account how a mobile app would be written for the enterprise.
That depends on your app design, if the first time(app online) , user login and app store all groups ,user information .After that user doesn't need to use token to get related information again(send request to server to acquire groups/user info). If app is offline , user doesn't need to re-authenticate(app controls the user session) , just get group/user information from cache . When using resource owner flow , you still need to send authenticate request to Azure AD server which need internet.

Code Rally Login Not Working

For starters, I am on Ubuntu 14.04.
When I try to connect my username to the server and it asks for logging in with social network, I am unable to do so.
For "Login With Facebook", the page ends up going to facebook and a pop up displays saying:
App Not Setup: This app is still in development mode, and you don't
have access to it. Switch to a registered test user or ask an app
admin for permissions.
So, I guessed the facebook app wasn't set up properly and created a new user using Twitter. But logging in with Twitter fails as well. The OAuth goes through but when coming back to the app it says:
We were not able to match your social media account with this
username. Ensure your username is correct or the social media login
method is correct. Please close the browser and try again.
The link for "Or visit the Code Rally community for more details!" doesn't work either and I can't comment on any of the blog posts.
I am running out of social network logins so please advise what to do. Also, one thing to note is when I signup, I signup with a different email than the social network one, would that have anything to do with it?
which server are you trying to login on? (NA/EU/BR/IN/CN etc).
I'll go check the Facebook setup now to make sure I've not missed something, however it will help me narrow down the issue if I know which server is having issues.
The reason you can't login with Twitter on your ID is that it will already be associated with your Facebook ID which you registered with on InfoQ's contest site. To use Twitter you'll need to re-register a new ID on InfoQ's site and link it to your Twitter account (although I'd prefer to fix whatever is messing with the Facebook login).
edit
Looks like there was an issue in our Facebook OAuth config - it should be fixed now :-)

Resources